mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-02-27 04:44:10 +01:00
9 lines
285 B
TypeScript
9 lines
285 B
TypeScript
|
|
import keySchema, { IKey } from '~/schema/key';
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Creates or returns the Key model using the provided mongoose instance and schema
|
||
|
|
*/
|
||
|
|
export function createKeyModel(mongoose: typeof import('mongoose')) {
|
||
|
|
return mongoose.models.Key || mongoose.model<IKey>('Key', keySchema);
|
||
|
|
}
|