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,5 +1,5 @@
|
|||
const { Token } = require('@librechat/data-schemas');
|
||||
const { encryptV2 } = require('~/server/utils/crypto');
|
||||
const db = require('~/lib/db/connectDb');
|
||||
|
||||
/**
|
||||
* Handles the OAuth token by creating or updating the token.
|
||||
|
|
@ -29,7 +29,6 @@ async function handleOAuthToken({
|
|||
expiresIn: parseInt(expiresIn, 10) || 3600,
|
||||
};
|
||||
|
||||
const { Token } = db.models;
|
||||
const existingToken = await Token.findToken({ userId, identifier });
|
||||
if (existingToken) {
|
||||
return await Token.updateToken({ identifier }, tokenData);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue