mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-03-02 06:10:18 +01:00
9 lines
312 B
TypeScript
9 lines
312 B
TypeScript
|
|
import presetSchema, { IPreset } from '~/schema/preset';
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Creates or returns the Preset model using the provided mongoose instance and schema
|
||
|
|
*/
|
||
|
|
export function createPresetModel(mongoose: typeof import('mongoose')) {
|
||
|
|
return mongoose.models.Preset || mongoose.model<IPreset>('Preset', presetSchema);
|
||
|
|
}
|