quivr/frontend/lib/api/brain/utils/mapSubscriptionUpdatablePropertiesToBackendSubscriptionUpdatableProperties.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

14 lines
547 B
TypeScript

import { BrainRoleType } from "@/lib/components/NavBar/components/NavItems/components/BrainsDropDown/components/BrainActions/types";
import { SubscriptionUpdatableProperties } from "../types";
type BackendSubscriptionUpdatableProperties = {
rights: BrainRoleType | null;
};
export const mapSubscriptionUpdatablePropertiesToBackendSubscriptionUpdatableProperties =
(
subscriptionUpdatableProperties: SubscriptionUpdatableProperties
): BackendSubscriptionUpdatableProperties => ({
rights: subscriptionUpdatableProperties.role,
});