quivr/frontend/lib/api/brain/utils/mapSubscriptionUpdatablePropertiesToBackendSubscriptionUpdatableProperties.ts

14 lines
547 B
TypeScript
Raw Normal View History

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,
});