mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-17 17:00:15 +01:00
fix(User.js, auth.service.js, localStrategy.js): change deprecated Joi.validate() to schema.validate() method (#322)
This commit is contained in:
parent
92eee52c52
commit
e56d90e45a
3 changed files with 4 additions and 6 deletions
|
|
@ -4,7 +4,6 @@ const sendEmail = require('../../utils/sendEmail');
|
|||
const crypto = require('crypto');
|
||||
const bcrypt = require('bcrypt');
|
||||
const DebugControl = require('../../utils/debug.js');
|
||||
const Joi = require('joi');
|
||||
const { registerSchema } = require('../../strategies/validators');
|
||||
const migrateDataToFirstUser = require('../../utils/migrateDataToFirstUser');
|
||||
|
||||
|
|
@ -47,7 +46,7 @@ const logoutUser = async (user, refreshToken) => {
|
|||
|
||||
const registerUser = async (user) => {
|
||||
let response = {};
|
||||
const { error } = Joi.validate(user, registerSchema);
|
||||
const { error } = registerSchema.validate(user);
|
||||
if (error) {
|
||||
log({
|
||||
title: 'Route: register - Joi Validation Error',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue