mirror of
https://github.com/nextcloud/server.git
synced 2026-04-21 14:23:17 -04:00
feat(translation): Allow guests to use translations as well
Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
parent
032821d2b5
commit
e5d0ff0c19
1 changed files with 4 additions and 2 deletions
|
|
@ -52,7 +52,7 @@ class TranslationApiController extends \OCP\AppFramework\OCSController {
|
|||
}
|
||||
|
||||
/**
|
||||
* @NoAdminRequired
|
||||
* @PublicPage
|
||||
*/
|
||||
public function languages(): DataResponse {
|
||||
return new DataResponse([
|
||||
|
|
@ -62,7 +62,9 @@ class TranslationApiController extends \OCP\AppFramework\OCSController {
|
|||
}
|
||||
|
||||
/**
|
||||
* @NoAdminRequired
|
||||
* @PublicPage
|
||||
* @UserRateThrottle(limit=25, period=120)
|
||||
* @AnonRateThrottle(limit=10, period=120)
|
||||
*/
|
||||
public function translate(string $text, ?string $fromLanguage, string $toLanguage): DataResponse {
|
||||
try {
|
||||
|
|
|
|||
Loading…
Reference in a new issue