Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
feat(translation): Allow guests to use translations as well
Signed-off-by: Joas Schilling <[email protected]>
  • Loading branch information
nickvergessen committed Apr 13, 2023
commit 35b083449a02bd7bdc04e82847a045c4a0d9c9af
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