SES-154 Endpoint zmiany statusu sklepikarza #80
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user