Explorar el Código

fix reset password error when user does not exist

Pouria Ezzati hace 11 meses
padre
commit
4a34cfe993
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      server/queries/user.queries.js

+ 1 - 1
server/queries/user.queries.js

@@ -72,7 +72,7 @@ async function update(match, update, methods) {
     });
 
     const user = await query.select("id").first();
-    if (!user) return null;
+    if (!user) return {};
     
     const updateQuery = trx("users").where("id", user.id);
     if (methods?.increments) {