Skip to content

Commit

Permalink
fixup! fixup! feat: Add transfer endpoint
Browse files Browse the repository at this point in the history
Signed-off-by: Christopher Ng <[email protected]>
  • Loading branch information
Pytal committed Jun 17, 2024
1 parent e32aeb0 commit 2ddef52
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Controller/UsersController.php
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ public function transfer(string $email, string $userId, string $password): DataR
);

if (!($newUser instanceof IUser)) {
throw new OCSException('Failed to create new user');
throw new OCSException($this->l10n->t('Failed to create new user'));
}

$newUser->setSystemEMailAddress($email);
Expand All @@ -199,7 +199,7 @@ public function transfer(string $email, string $userId, string $password): DataR
if (!$result) {
$this->logger->error('Failed to delete user', [ 'userId' => $newUser->getUID() ]);
}
throw new OCSException('Failed to transfer guest');
throw new OCSException($this->l10n->t('Failed to transfer guest'));
}
return new DataResponse([], Http::STATUS_CREATED);
}
Expand Down

0 comments on commit 2ddef52

Please sign in to comment.