quivr/frontend/lib/api/brain/utils/mapBackendMinimalBrainToMinimalBrain.ts
Mamadou DICKO d27504f735
Feat/rate limiting (#719)
* feat: add max brain count

* fix: prevent page cashing when invitation is invalid

* feat: rename rights to role in frontend
2023-07-20 18:17:55 +02:00

13 lines
344 B
TypeScript

import {
BackendMinimalBrainForUser,
MinimalBrainForUser,
} from "@/lib/context/BrainProvider/types";
export const mapBackendMinimalBrainToMinimalBrain = (
backendMinimalBrain: BackendMinimalBrainForUser
): MinimalBrainForUser => ({
id: backendMinimalBrain.id,
name: backendMinimalBrain.name,
role: backendMinimalBrain.rights,
});