diff --git a/BTCPayServer/Controllers/GreenField/GreenfieldAppsController.cs b/BTCPayServer/Controllers/GreenField/GreenfieldAppsController.cs index 8fa1cced4..65043a430 100644 --- a/BTCPayServer/Controllers/GreenField/GreenfieldAppsController.cs +++ b/BTCPayServer/Controllers/GreenField/GreenfieldAppsController.cs @@ -195,30 +195,17 @@ namespace BTCPayServer.Controllers.Greenfield } [HttpGet("~/api/v1/apps/pos/{appId}")] - [Authorize(Policy = Policies.CanModifyStoreSettings, AuthenticationSchemes = AuthenticationSchemes.Greenfield)] public async Task GetPosApp(string appId) { var app = await _appService.GetApp(appId, PointOfSaleAppType.AppType, includeArchived: true); - if (app == null) - { - return AppNotFound(); - } - - return Ok(ToPointOfSaleModel(app)); + return app == null ? AppNotFound() : Ok(ToPointOfSaleModel(app)); } [HttpGet("~/api/v1/apps/crowdfund/{appId}")] - [Authorize(Policy = Policies.CanModifyStoreSettings, AuthenticationSchemes = AuthenticationSchemes.Greenfield)] public async Task GetCrowdfundApp(string appId) { var app = await _appService.GetApp(appId, CrowdfundAppType.AppType, includeArchived: true); - if (app == null) - { - return AppNotFound(); - } - - var model = await ToCrowdfundModel(app); - return Ok(model); + return app == null ? AppNotFound() : Ok(await ToCrowdfundModel(app)); } [HttpDelete("~/api/v1/apps/{appId}")] diff --git a/BTCPayServer/wwwroot/swagger/v1/swagger.template.apps.json b/BTCPayServer/wwwroot/swagger/v1/swagger.template.apps.json index 32f169619..ff1ae847a 100644 --- a/BTCPayServer/wwwroot/swagger/v1/swagger.template.apps.json +++ b/BTCPayServer/wwwroot/swagger/v1/swagger.template.apps.json @@ -135,15 +135,7 @@ "404": { "description": "POS app with specified ID was not found" } - }, - "security": [ - { - "API_Key": [ - "btcpay.store.canmodifystoresettings" - ], - "Basic": [] - } - ] + } } }, "/api/v1/apps/crowdfund/{appId}": { @@ -174,15 +166,7 @@ "404": { "description": "Crowdfund app with specified ID was not found" } - }, - "security": [ - { - "API_Key": [ - "btcpay.store.canmodifystoresettings" - ], - "Basic": [] - } - ] + } } }, "/api/v1/stores/{storeId}/apps/crowdfund": {