Skip to content

Commit 1011024

Browse files
committed
pr fixes
1 parent b3bde54 commit 1011024

File tree

4 files changed

+16
-12
lines changed

4 files changed

+16
-12
lines changed

src/services/api/player-auth-api.service.ts

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ export default class PlayerAuthAPIService extends APIService {
289289
createPlayerAuthActivity(req, alias.player, {
290290
type: PlayerAuthActivityType.CHANGE_PASSWORD_FAILED,
291291
extra: {
292-
errrorCode: PlayerAuthErrorCode.INVALID_CREDENTIALS
292+
errorCode: PlayerAuthErrorCode.INVALID_CREDENTIALS
293293
}
294294
})
295295
await em.flush()
@@ -305,7 +305,7 @@ export default class PlayerAuthAPIService extends APIService {
305305
createPlayerAuthActivity(req, alias.player, {
306306
type: PlayerAuthActivityType.CHANGE_PASSWORD_FAILED,
307307
extra: {
308-
errrorCode: PlayerAuthErrorCode.NEW_PASSWORD_MATCHES_CURRENT_PASSWORD
308+
errorCode: PlayerAuthErrorCode.NEW_PASSWORD_MATCHES_CURRENT_PASSWORD
309309
}
310310
})
311311
await em.flush()
@@ -347,7 +347,7 @@ export default class PlayerAuthAPIService extends APIService {
347347
createPlayerAuthActivity(req, alias.player, {
348348
type: PlayerAuthActivityType.CHANGE_EMAIL_FAILED,
349349
extra: {
350-
errrorCode: PlayerAuthErrorCode.INVALID_CREDENTIALS
350+
errorCode: PlayerAuthErrorCode.INVALID_CREDENTIALS
351351
}
352352
})
353353
await em.flush()
@@ -363,7 +363,7 @@ export default class PlayerAuthAPIService extends APIService {
363363
createPlayerAuthActivity(req, alias.player, {
364364
type: PlayerAuthActivityType.CHANGE_EMAIL_FAILED,
365365
extra: {
366-
errrorCode: PlayerAuthErrorCode.NEW_EMAIL_MATCHES_CURRENT_EMAIL
366+
errorCode: PlayerAuthErrorCode.NEW_EMAIL_MATCHES_CURRENT_EMAIL
367367
}
368368
})
369369
await em.flush()
@@ -492,7 +492,8 @@ export default class PlayerAuthAPIService extends APIService {
492492
createPlayerAuthActivity(req, alias.player, {
493493
type: PlayerAuthActivityType.TOGGLE_VERIFICATION_FAILED,
494494
extra: {
495-
errrorCode: PlayerAuthErrorCode.VERIFICATION_EMAIL_REQUIRED
495+
errorCode: PlayerAuthErrorCode.VERIFICATION_EMAIL_REQUIRED,
496+
verificationEnabled: Boolean(verificationEnabled)
496497
}
497498
})
498499
await em.flush()
@@ -508,7 +509,8 @@ export default class PlayerAuthAPIService extends APIService {
508509
createPlayerAuthActivity(req, alias.player, {
509510
type: PlayerAuthActivityType.TOGGLE_VERIFICATION_FAILED,
510511
extra: {
511-
errrorCode: PlayerAuthErrorCode.INVALID_CREDENTIALS
512+
errorCode: PlayerAuthErrorCode.INVALID_CREDENTIALS,
513+
verificationEnabled: Boolean(verificationEnabled)
512514
}
513515
})
514516
await em.flush()

tests/services/_api/player-auth-api/changeEmail.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ describe('Player auth API service - change email', () => {
106106
type: PlayerAuthActivityType.CHANGE_EMAIL_FAILED,
107107
player: player.id,
108108
extra: {
109-
errrorCode: 'INVALID_CREDENTIALS'
109+
errorCode: 'INVALID_CREDENTIALS'
110110
}
111111
})
112112
expect(activity).not.toBeNull()
@@ -146,7 +146,7 @@ describe('Player auth API service - change email', () => {
146146
type: PlayerAuthActivityType.CHANGE_EMAIL_FAILED,
147147
player: player.id,
148148
extra: {
149-
errrorCode: 'NEW_EMAIL_MATCHES_CURRENT_EMAIL'
149+
errorCode: 'NEW_EMAIL_MATCHES_CURRENT_EMAIL'
150150
}
151151
})
152152
expect(activity).not.toBeNull()

tests/services/_api/player-auth-api/changePassword.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ describe('Player auth API service - change password', () => {
103103
type: PlayerAuthActivityType.CHANGE_PASSWORD_FAILED,
104104
player: player.id,
105105
extra: {
106-
errrorCode: 'INVALID_CREDENTIALS'
106+
errorCode: 'INVALID_CREDENTIALS'
107107
}
108108
})
109109
expect(activity).not.toBeNull()
@@ -143,7 +143,7 @@ describe('Player auth API service - change password', () => {
143143
type: PlayerAuthActivityType.CHANGE_PASSWORD_FAILED,
144144
player: player.id,
145145
extra: {
146-
errrorCode: 'NEW_PASSWORD_MATCHES_CURRENT_PASSWORD'
146+
errorCode: 'NEW_PASSWORD_MATCHES_CURRENT_PASSWORD'
147147
}
148148
})
149149
expect(activity).not.toBeNull()

tests/services/_api/player-auth-api/toggleVerification.test.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,8 @@ describe('Player auth API service - toggle verification', () => {
118118
type: PlayerAuthActivityType.TOGGLE_VERIFICATION_FAILED,
119119
player: player.id,
120120
extra: {
121-
errrorCode: 'VERIFICATION_EMAIL_REQUIRED'
121+
errorCode: 'VERIFICATION_EMAIL_REQUIRED',
122+
verificationEnabled: true
122123
}
123124
})
124125
expect(activity).not.toBeNull()
@@ -158,7 +159,8 @@ describe('Player auth API service - toggle verification', () => {
158159
type: PlayerAuthActivityType.TOGGLE_VERIFICATION_FAILED,
159160
player: player.id,
160161
extra: {
161-
errrorCode: 'INVALID_CREDENTIALS'
162+
errorCode: 'INVALID_CREDENTIALS',
163+
verificationEnabled: true
162164
}
163165
})
164166
expect(activity).not.toBeNull()

0 commit comments

Comments
 (0)