diff --git a/packages/nocodb/src/helpers/apiHelpers.ts b/packages/nocodb/src/helpers/apiHelpers.ts index db033aaa9c..1116d7dcd6 100644 --- a/packages/nocodb/src/helpers/apiHelpers.ts +++ b/packages/nocodb/src/helpers/apiHelpers.ts @@ -45,7 +45,8 @@ export const validatePayload = (schema: string, payload: any) => { // If the request body is not valid, throw error if (!valid) { - const errors: ErrorObject[] | null | undefined = ajv.errors || validate.errors; + const errors: ErrorObject[] | null | undefined = + ajv.errors || validate.errors; // If the request body is invalid, throw error with error message and errors NcError.ajvValidationError({ diff --git a/packages/nocodb/src/strategies/jwt.strategy.ts b/packages/nocodb/src/strategies/jwt.strategy.ts index 26ad46123a..ddaf6b3332 100644 --- a/packages/nocodb/src/strategies/jwt.strategy.ts +++ b/packages/nocodb/src/strategies/jwt.strategy.ts @@ -15,7 +15,7 @@ export class JwtStrategy extends PassportStrategy(Strategy) { async validate(req, jwtPayload) { if (!jwtPayload?.email) { - return jwtPayload + return jwtPayload; } const user = await User.getByEmail(jwtPayload?.email);