feat: add RollCallController with current day roll call API endpoint
This commit is contained in:
25
ServiceHost/Areas/Client/Controllers/RollCallController.cs
Normal file
25
ServiceHost/Areas/Client/Controllers/RollCallController.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
using _0_Framework.Application;
|
||||
using Company.Domain.CheckoutAgg;
|
||||
using CompanyManagment.App.Contracts.RollCall;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using ServiceHost.BaseControllers;
|
||||
|
||||
namespace ServiceHost.Areas.Client.Controllers;
|
||||
|
||||
public class RollCallController:ClientBaseController
|
||||
{
|
||||
private long _workshopId;
|
||||
private readonly IRollCallApplication _rollCallApplication;
|
||||
|
||||
public RollCallController(IRollCallApplication rollCallApplication,IAuthHelper authHelper)
|
||||
{
|
||||
_rollCallApplication = rollCallApplication;
|
||||
_workshopId = authHelper.GetWorkshopId();
|
||||
}
|
||||
[HttpGet("current-day")]
|
||||
public ActionResult<CurrentDayRollCall> GetCurrentDay()
|
||||
{
|
||||
var res = _rollCallApplication.GetWorkshopCurrentDayRollCalls(_workshopId);
|
||||
return res;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user