mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-01-21 09:46:12 +01:00
10 lines
339 B
TypeScript
10 lines
339 B
TypeScript
|
|
import actionSchema from '~/schema/action';
|
||
|
|
import type { IAction } from '~/types';
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Creates or returns the Action model using the provided mongoose instance and schema
|
||
|
|
*/
|
||
|
|
export function createActionModel(mongoose: typeof import('mongoose')) {
|
||
|
|
return mongoose.models.Action || mongoose.model<IAction>('Action', actionSchema);
|
||
|
|
}
|