mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-01-15 23:15:30 +01:00
11 lines
378 B
TypeScript
11 lines
378 B
TypeScript
import accessRoleSchema from '~/schema/accessRole';
|
|
import type * as t from '~/types';
|
|
|
|
/**
|
|
* Creates or returns the AccessRole model using the provided mongoose instance and schema
|
|
*/
|
|
export function createAccessRoleModel(mongoose: typeof import('mongoose')) {
|
|
return (
|
|
mongoose.models.AccessRole || mongoose.model<t.IAccessRole>('AccessRole', accessRoleSchema)
|
|
);
|
|
}
|