finalizare 1.0
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using Application.Endpoints;
|
||||
using Application.Endpoints.SicknessPrediction;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace API.Controllers;
|
||||
@@ -7,11 +8,11 @@ namespace API.Controllers;
|
||||
[Route("api/[controller]")]
|
||||
public class SicknessPredictionController : BaseApiController
|
||||
{
|
||||
[Authorize(Policy = Policies.DoctorPolicy)]
|
||||
[HttpPost]
|
||||
public async Task<ActionResult<BaseResponse>> GetPrediction(SicknessPredictionDto dto)
|
||||
public async Task<ActionResult<BaseResponse>> GetPrediction(SicknessPredictionCommand command)
|
||||
{
|
||||
var handler = new SicknessPredictionHandler();
|
||||
var result = await handler.GetPrediction(dto);
|
||||
var result = await SicknessPredictionHandler.GetPrediction(command);
|
||||
return StatusCode(result.StatusCode, result);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user