Files
FACULTATE-HEALTHCARE_MANAGER/backend/API/Controllers/SicknessPredictionController.cs
T
2024-05-21 12:10:53 +03:00

18 lines
581 B
C#

using Application.Endpoints;
using Application.Endpoints.SicknessPrediction;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
namespace API.Controllers;
[Route("api/[controller]")]
public class SicknessPredictionController : BaseApiController
{
[Authorize(Policy = Policies.DoctorPolicy)]
[HttpPost]
public async Task<ActionResult<BaseResponse>> GetPrediction(SicknessPredictionCommand command)
{
var result = await SicknessPredictionHandler.GetPrediction(command);
return StatusCode(result.StatusCode, result);
}
}