Skip to content

Commit

Permalink
Merge branch 'development' into production
Browse files Browse the repository at this point in the history
  • Loading branch information
Josue Monteiro committed Aug 29, 2024
2 parents 720c928 + a68e648 commit b97ab9f
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions server/src/endpoints/v1/accounts/accounts.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,15 @@ class AccountsService {

// If either account is not found, Create a new account for the device that wasn't found
if (!account1 || !account2) {

if (!account1 && !device1Id) {
throw new HttpException(HttpStatus.BAD_REQUEST, 'Device 1 Id is required');
}

if (!account2 && !device2Id) {
throw new HttpException(HttpStatus.BAD_REQUEST, 'Device 2 Id is required');
}

return await this._newAccountFromDeviceId(!account1 ? device1Id : device2Id);
}

Expand Down

0 comments on commit b97ab9f

Please sign in to comment.