1
0
mirror of https://github.com/spacebarchat/server.git synced 2024-11-22 02:12:40 +01:00

Check for old password when setting new

Checks for password
This commit is contained in:
MathMan05 2024-08-25 22:56:55 -05:00 committed by GitHub
parent e3707e6a56
commit 582853542a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -127,7 +127,7 @@ router.patch(
}
if (body.new_password) {
if (!body.password && !user.email) {
if (!body.password || !user.email) {
throw FieldErrors({
password: {
code: "BASE_TYPE_REQUIRED",