mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-20 10:20: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 { deleteTokens } = require('@librechat/data-schemas');
|
||||
const { getInvite } = require('~/models/inviteUser');
|
||||
const db = require('~/lib/db/connectDb');
|
||||
|
||||
async function checkInviteUser(req, res, next) {
|
||||
const token = req.body.token;
|
||||
|
|
@ -16,7 +16,7 @@ async function checkInviteUser(req, res, next) {
|
|||
return res.status(400).json({ message: 'Invalid invite token' });
|
||||
}
|
||||
|
||||
await db.models.Token.deleteTokens({ token: invite.token });
|
||||
await deleteTokens({ token: invite.token });
|
||||
req.invite = invite;
|
||||
next();
|
||||
} catch (error) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue