You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

12 lines
543 B

1 year ago
  1. import { getUserView, UserView } from './models/user.model';
  2. export const getSiteAdmins = (): Promise<UserView[]> => { return getUserView({ admin: true }, true); };
  3. export const getSiteMods = (): Promise<UserView[]> => { return getUserView({ sitemod: true }, true); };
  4. export const getBanned = (): Promise<UserView[]> => { return getUserView({ banned: true }, true); };
  5. export const getUserSecure = async (userId: UserView['id']): Promise<UserView> => {
  6. const userList = await getUserView({ id: userId }, true);
  7. return userList[0];
  8. };