Skip to content

Commit

Permalink
Merge pull request #312 from TaloDev/develop
Browse files Browse the repository at this point in the history
Release 0.36.1
  • Loading branch information
tudddorrr authored Jul 25, 2024
2 parents d90270c + 515e593 commit 3bceed8
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 31 deletions.
56 changes: 32 additions & 24 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "game-services",
"version": "0.36.0",
"version": "0.36.1",
"description": "",
"main": "src/index.ts",
"scripts": {
Expand Down
4 changes: 2 additions & 2 deletions src/entities/player-auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ export enum PlayerAuthErrorCode {
IDENTIFIER_TAKEN = 'IDENTIFIER_TAKEN',
MISSING_SESSION = 'MISSING_SESSION',
INVALID_SESSION = 'INVALID_SESSION',
NEW_PASSWORD_MATCHES_OLD_PASSWORD = 'NEW_PASSWORD_MATCHES_OLD_PASSWORD',
NEW_EMAIL_MATCHES_OLD_EMAIL = 'NEW_EMAIL_MATCHES_OLD_EMAIL',
NEW_PASSWORD_MATCHES_CURRENT_PASSWORD = 'NEW_PASSWORD_MATCHES_CURRENT_PASSWORD',
NEW_EMAIL_MATCHES_CURRENT_EMAIL = 'NEW_EMAIL_MATCHES_CURRENT_EMAIL',
PASSWORD_RESET_CODE_INVALID = 'PASSWORD_RESET_CODE_INVALID'
}

Expand Down
4 changes: 2 additions & 2 deletions src/services/api/player-auth-api.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ export default class PlayerAuthAPIService extends APIService {
if (isSamePassword) {
req.ctx.throw(400, {
message: 'Please choose a different password',
errorCode: PlayerAuthErrorCode.NEW_PASSWORD_MATCHES_OLD_PASSWORD
errorCode: PlayerAuthErrorCode.NEW_PASSWORD_MATCHES_CURRENT_PASSWORD
})
}

Expand Down Expand Up @@ -291,7 +291,7 @@ export default class PlayerAuthAPIService extends APIService {
if (isSameEmail) {
req.ctx.throw(400, {
message: 'Please choose a different email address',
errorCode: PlayerAuthErrorCode.NEW_EMAIL_MATCHES_OLD_EMAIL
errorCode: PlayerAuthErrorCode.NEW_EMAIL_MATCHES_CURRENT_EMAIL
})
}

Expand Down
2 changes: 1 addition & 1 deletion tests/services/_api/player-auth-api/changeEmail.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ describe('Player auth API service - change email', () => {

expect(res.body).toStrictEqual({
message: 'Please choose a different email address',
errorCode: 'NEW_EMAIL_MATCHES_OLD_EMAIL'
errorCode: 'NEW_EMAIL_MATCHES_CURRENT_EMAIL'
})
})
})
2 changes: 1 addition & 1 deletion tests/services/_api/player-auth-api/changePassword.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ describe('Player auth API service - change password', () => {

expect(res.body).toStrictEqual({
message: 'Please choose a different password',
errorCode: 'NEW_PASSWORD_MATCHES_OLD_PASSWORD'
errorCode: 'NEW_PASSWORD_MATCHES_CURRENT_PASSWORD'
})
})
})

0 comments on commit 3bceed8

Please sign in to comment.