18 lines
581 B
C#
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);
|
|
}
|
|
} |