mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-20 02:10:15 +01:00
refactor: original changes
This commit is contained in:
parent
fa9177180f
commit
f9c0e9853f
83 changed files with 413 additions and 505 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue