SES-160 shop on gm and player screen #85
@ -21,6 +21,7 @@ namespace SessionCompanion.Controllers
|
|||||||
{
|
{
|
||||||
_service = shopkeeperService;
|
_service = shopkeeperService;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Endpoint zwracający liste sklepikarzy
|
/// Endpoint zwracający liste sklepikarzy
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -42,5 +43,13 @@ namespace SessionCompanion.Controllers
|
|||||||
{
|
{
|
||||||
return await _service.ChangeShopkeeperStatus(shopkeeperId, availability);
|
return await _service.ChangeShopkeeperStatus(shopkeeperId, availability);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[HttpPost("createNewShopkeeper")]
|
||||||
|
public async Task<Either<SuccessResponse, ErrorResponse>> CreateNewShopKeeper([Required] ShopkeeperWithItemsViewModel shopkeeperWithItemsViewModel)
|
||||||
|
{
|
||||||
|
if (!ModelState.IsValid)
|
||||||
|
return new ErrorResponse() { StatusCode = 500, Message = "Model is invalid" };
|
||||||
|
return await _service.CreateNewShopKeeper(shopkeeperWithItemsViewModel);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user