diff --git a/SessionCompanion/SessionCompanion/Controllers/ShopkeeperController.cs b/SessionCompanion/SessionCompanion/Controllers/ShopkeeperController.cs
index af1bdd3..c58a98f 100644
--- a/SessionCompanion/SessionCompanion/Controllers/ShopkeeperController.cs
+++ b/SessionCompanion/SessionCompanion/Controllers/ShopkeeperController.cs
@@ -21,6 +21,7 @@ namespace SessionCompanion.Controllers
{
_service = shopkeeperService;
}
+
///
/// Endpoint zwracajÄ…cy liste sklepikarzy
///
@@ -42,5 +43,13 @@ namespace SessionCompanion.Controllers
{
return await _service.ChangeShopkeeperStatus(shopkeeperId, availability);
}
+
+ [HttpPost("createNewShopkeeper")]
+ public async Task> CreateNewShopKeeper([Required] ShopkeeperWithItemsViewModel shopkeeperWithItemsViewModel)
+ {
+ if (!ModelState.IsValid)
+ return new ErrorResponse() { StatusCode = 500, Message = "Model is invalid" };
+ return await _service.CreateNewShopKeeper(shopkeeperWithItemsViewModel);
+ }
}
}