This repository has been archived on 2022-08-14. You can view files and clone it, but cannot push or open issues or pull requests.
outline/server/presenters/collectionGroupMembership.js

19 lines
414 B
JavaScript

// @flow
import { CollectionGroup } from "../models";
type Membership = {
id: string,
groupId: string,
collectionId: string,
permission: string,
};
export default (membership: CollectionGroup): Membership => {
return {
id: `${membership.groupId}-${membership.collectionId}`,
groupId: membership.groupId,
collectionId: membership.collectionId,
permission: membership.permission,
};
};