Skip to content

Commit

Permalink
chore: convert saveUser to ts
Browse files Browse the repository at this point in the history
  • Loading branch information
pierre-lehnen-rc committed Oct 24, 2024
1 parent 72182ba commit b27e5b2
Show file tree
Hide file tree
Showing 18 changed files with 904 additions and 475 deletions.
3 changes: 3 additions & 0 deletions apps/meteor/app/authorization/server/functions/getRoles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,6 @@ import type { IRole } from '@rocket.chat/core-typings';
import { Roles } from '@rocket.chat/models';

export const getRoles = async (): Promise<IRole[]> => Roles.find().toArray();

export const getRoleIds = async (): Promise<IRole['_id'][]> =>
(await Roles.find({}, { projection: { _id: 1 } }).toArray()).map(({ _id }) => _id);
Loading

0 comments on commit b27e5b2

Please sign in to comment.