Skip to content

Commit

Permalink
feat(translation): Allow guests to use translations as well
Browse files Browse the repository at this point in the history
Signed-off-by: Joas Schilling <coding@schilljs.com>
  • Loading branch information
nickvergessen committed Apr 13, 2023
1 parent 5a502c6 commit 35b0834
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions core/Controller/TranslationApiController.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public function __construct(
}

/**
* @NoAdminRequired
* @PublicPage
*/
public function languages(): DataResponse {
return new DataResponse([
Expand All @@ -62,7 +62,9 @@ public function languages(): DataResponse {
}

/**
* @NoAdminRequired
* @PublicPage
* @UserRateThrottle(limit=25, period=120)
* @AnonRateThrottle(limit=10, period=120)
*/
public function translate(string $text, ?string $fromLanguage, string $toLanguage): DataResponse {
try {
Expand Down

0 comments on commit 35b0834

Please sign in to comment.