refactor: original changes

This commit is contained in:
Danny Avila 2025-05-30 04:28:22 -04:00
parent fa9177180f
commit f9c0e9853f
No known key found for this signature in database
GPG key ID: BF31EEB2C5CA0956
83 changed files with 413 additions and 505 deletions

View file

@ -1,7 +1,6 @@
const { SystemRoles } = require('librechat-data-provider');
const { User, logger } = require('@librechat/data-schemas');
const { Strategy: JwtStrategy, ExtractJwt } = require('passport-jwt');
const { logger } = require('~/config');
const db = require('~/lib/db/connectDb');
// JWT strategy
const jwtLogin = () =>
@ -12,7 +11,6 @@ const jwtLogin = () =>
},
async (payload, done) => {
try {
const {User} = db.models;
const user = await User.getUserById(payload?.id, '-password -__v -totpSecret');
if (user) {
user.id = user._id.toString();