mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-01-05 18:18:51 +01:00
refactor(data-schemas): update model and method creation for improved modularity
- Refactored model creation functions to enhance clarity and consistency across the data-schemas. - Introduced createModels and createMethods functions to streamline the instantiation of Mongoose models and methods. - Updated test-role.js to utilize the new createModels and createMethods for better organization.
This commit is contained in:
parent
728d19e361
commit
76e070048c
15 changed files with 107 additions and 117 deletions
|
|
@ -1,9 +1,9 @@
|
|||
require('dotenv').config({ path: '../.env' });
|
||||
const mongoose = require('mongoose');
|
||||
const connect = require('../config/connect');
|
||||
const { createRoleMethods, createRoleModel } = require('@librechat/data-schemas');
|
||||
createRoleModel(mongoose);
|
||||
const { listRoles } = createRoleMethods(mongoose);
|
||||
const { createModels, createMethods } = require('@librechat/data-schemas');
|
||||
createModels(mongoose);
|
||||
const { listRoles } = createMethods(mongoose);
|
||||
|
||||
(async () => {
|
||||
await connect();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue