mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-02-23 19:04:10 +01:00
9 lines
331 B
TypeScript
9 lines
331 B
TypeScript
|
|
import projectSchema, { IMongoProject } from '~/schema/project';
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Creates or returns the Project model using the provided mongoose instance and schema
|
||
|
|
*/
|
||
|
|
export function createProjectModel(mongoose: typeof import('mongoose')) {
|
||
|
|
return mongoose.models.Project || mongoose.model<IMongoProject>('Project', projectSchema);
|
||
|
|
}
|