SES-154 Endpoint zmiany statusu sklepikarza #80

Merged
s426134 merged 5 commits from SES-154 into dev 2021-01-21 18:22:20 +01:00
Showing only changes of commit 0b29aca44d - Show all commits

View File

@ -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();
}
/// <summary>
/// Endpoint służacy do zmiany statusu sklepikarza
/// </summary>
/// <param name="shopkeeperId"></param>
/// <param name="availability"></param>
/// <returns>SuccesResponse/ErrorResponse</returns>
[HttpPut("changeShopkeeperStatus")]
public async Task<Either<SuccessResponse, ErrorResponse>> ChangeShopkeeperStatus([Required] int shopkeeperId, [Required] bool availability)
{
return await _service.ChangeShopkeeperStatus(shopkeeperId, availability);
}
}
}