mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-03-03 06:40:20 +01:00
12 lines
378 B
TypeScript
12 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)
|
||
|
|
);
|
||
|
|
}
|