mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-01-08 03:28:51 +01:00
9 lines
333 B
TypeScript
9 lines
333 B
TypeScript
|
|
import shareSchema, { ISharedLink } from '~/schema/share';
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Creates or returns the SharedLink model using the provided mongoose instance and schema
|
||
|
|
*/
|
||
|
|
export function createSharedLinkModel(mongoose: typeof import('mongoose')) {
|
||
|
|
return mongoose.models.SharedLink || mongoose.model<ISharedLink>('SharedLink', shareSchema);
|
||
|
|
}
|