mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-01-07 11:08:52 +01:00
- Move auth strategies to package/auth
- Move email and avatar functions to package/auth
This commit is contained in:
parent
e77aa92a7b
commit
f68be4727c
65 changed files with 2089 additions and 1967 deletions
|
|
@ -5,6 +5,7 @@ import {
|
|||
deleteMessages,
|
||||
deleteAllUserSessions,
|
||||
} from '@librechat/backend/models';
|
||||
import { createModels } from '@librechat/data-schemas';
|
||||
|
||||
type TUser = { email: string; password: string };
|
||||
|
||||
|
|
@ -41,7 +42,7 @@ export default async function cleanupUser(user: TUser) {
|
|||
await deleteAllUserSessions(userId.toString());
|
||||
|
||||
// Get models from the registered models
|
||||
const { User, Balance, Transaction } = getModels();
|
||||
const { User, Balance, Transaction } = createModels(db);
|
||||
|
||||
// Delete user, balance, and transactions using the registered models
|
||||
await User.deleteMany({ _id: userId });
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue