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 25, 2024
1 parent 72182ba commit 8b944a1
Show file tree
Hide file tree
Showing 20 changed files with 910 additions and 477 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 8b944a1

Please sign in to comment.