mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-09-22 06:00:56 +02:00
chore: Remove Unused Dependencies 🧹 (#939)
* chore: cleanup client depend 🧹
* chore: replace joi with zod and remove unused user validator
* chore: move dep from root to api, cleanup other unused api deps
* chore: remove unused dev dep
* chore: update bun lockfile
* fix: bun scripts
* chore: add bun flag to update script
* chore: remove legacy webpack + babel dev deps
* chore: add back dev deps needed for frontend unit testing
* fix(validators): make schemas as expected and more robust with a full test suite of edge cases
* chore: remove axios from root package, remove path from api, update bun
This commit is contained in:
parent
7f5b0b5310
commit
b3afd562b9
12 changed files with 1935 additions and 4938 deletions
|
@ -1,11 +1,11 @@
|
|||
const { Strategy: PassportLocalStrategy } = require('passport-local');
|
||||
const User = require('../models/User');
|
||||
const { loginSchema } = require('./validators');
|
||||
const { loginSchema, errorsToString } = require('./validators');
|
||||
const DebugControl = require('../utils/debug.js');
|
||||
|
||||
async function validateLoginRequest(req) {
|
||||
const { error } = loginSchema.validate(req.body);
|
||||
return error ? error.details[0].message : null;
|
||||
const { error } = loginSchema.safeParse(req.body);
|
||||
return error ? errorsToString(error.errors) : null;
|
||||
}
|
||||
|
||||
async function findUserByEmail(email) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue