SES-160 shop on gm and player screen #85

Merged
s426128 merged 11 commits from SES-160 into dev 2021-01-23 21:50:04 +01:00
Showing only changes of commit b0aaea1474 - Show all commits

View File

@ -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);
}
} }
} }