mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-04-04 23:07:19 +02:00
fix: move interleaved export below imports, add await to countUsersByRole
This commit is contained in:
parent
e9572854ef
commit
2a4cbfa41a
2 changed files with 2 additions and 3 deletions
|
|
@ -1,10 +1,9 @@
|
||||||
import { createSessionMethods, DEFAULT_REFRESH_TOKEN_EXPIRY, type SessionMethods } from './session';
|
import { createSessionMethods, DEFAULT_REFRESH_TOKEN_EXPIRY, type SessionMethods } from './session';
|
||||||
import { createTokenMethods, type TokenMethods } from './token';
|
import { createTokenMethods, type TokenMethods } from './token';
|
||||||
import { createRoleMethods, RoleConflictError, type RoleMethods, type RoleDeps } from './role';
|
import { createRoleMethods, RoleConflictError, type RoleMethods, type RoleDeps } from './role';
|
||||||
export { RoleConflictError };
|
|
||||||
import { createUserMethods, DEFAULT_SESSION_EXPIRY, type UserMethods } from './user';
|
import { createUserMethods, DEFAULT_SESSION_EXPIRY, type UserMethods } from './user';
|
||||||
|
|
||||||
export { DEFAULT_REFRESH_TOKEN_EXPIRY, DEFAULT_SESSION_EXPIRY };
|
export { RoleConflictError, DEFAULT_REFRESH_TOKEN_EXPIRY, DEFAULT_SESSION_EXPIRY };
|
||||||
import { createKeyMethods, type KeyMethods } from './key';
|
import { createKeyMethods, type KeyMethods } from './key';
|
||||||
import { createFileMethods, type FileMethods } from './file';
|
import { createFileMethods, type FileMethods } from './file';
|
||||||
/* Memories */
|
/* Memories */
|
||||||
|
|
|
||||||
|
|
@ -438,7 +438,7 @@ export function createRoleMethods(mongoose: typeof import('mongoose'), deps: Rol
|
||||||
}
|
}
|
||||||
|
|
||||||
async function countUsersByRole(roleName: string): Promise<number> {
|
async function countUsersByRole(roleName: string): Promise<number> {
|
||||||
return getUserModel().countDocuments({ role: roleName });
|
return await getUserModel().countDocuments({ role: roleName });
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue