From 0b29aca44d535aabc004041e7e746b7b60aa6b6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karol=20G=C3=B3rzy=C5=84ski?= Date: Wed, 20 Jan 2021 19:57:20 +0100 Subject: [PATCH] SES-154 Add Endpoint to change shopkeeper status --- .../Controllers/ShopkeeperController.cs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/SessionCompanion/SessionCompanion/Controllers/ShopkeeperController.cs b/SessionCompanion/SessionCompanion/Controllers/ShopkeeperController.cs index ee0ebc6..1496a71 100644 --- a/SessionCompanion/SessionCompanion/Controllers/ShopkeeperController.cs +++ b/SessionCompanion/SessionCompanion/Controllers/ShopkeeperController.cs @@ -5,6 +5,7 @@ using SessionCompanion.ViewModels.ApiResponses; using SessionCompanion.ViewModels.ShopkeeperViewModels; using System; using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; using System.Linq; using System.Threading.Tasks; @@ -29,5 +30,17 @@ namespace SessionCompanion.Controllers { return _service.Get().ToList(); } + + /// + /// Endpoint służacy do zmiany statusu sklepikarza + /// + /// + /// + /// SuccesResponse/ErrorResponse + [HttpPut("changeShopkeeperStatus")] + public async Task> ChangeShopkeeperStatus([Required] int shopkeeperId, [Required] bool availability) + { + return await _service.ChangeShopkeeperStatus(shopkeeperId, availability); + } } }