Skip to content

Commit

Permalink
fix: Allow API access for MT settings controller (#2079)
Browse files Browse the repository at this point in the history
  • Loading branch information
JanCizmar authored Jan 15, 2024
1 parent 4f1779e commit 71d8452
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ class MachineTranslationSettingsController(
@PutMapping("/{projectId}/machine-translation-service-settings")
@Operation(summary = "Sets machine translation settings for project")
@RequiresProjectPermissions([ Scope.LANGUAGES_EDIT ])
@AllowApiAccess
fun setMachineTranslationSettings(
@RequestBody dto: SetMachineTranslationSettingsDto,
): CollectionModel<LanguageConfigItemModel> {
Expand All @@ -56,6 +57,7 @@ class MachineTranslationSettingsController(
@GetMapping("/{projectId}/machine-translation-language-info")
@Operation(summary = "Returns info about formality and ")
@RequiresProjectPermissions([ Scope.LANGUAGES_EDIT ])
@AllowApiAccess
fun getMachineTranslationLanguageInfo(): CollectionModel<LanguageInfoModel> {
val data = mtServiceConfigService.getLanguageInfo(projectHolder.project)
return CollectionModel.of(
Expand Down

0 comments on commit 71d8452

Please sign in to comment.