using Fuel.Application.Service;
using Fuel.Core.Nozzle.Dto;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;

namespace Fuel.PaymentServer.Controllers
{
    [Route("api/[controller]")]
    [ApiController]
    public class NozzleController : ControllerBase
    {
        private readonly INozzleService InozzleService;
        public NozzleController(INozzleService nozzleService)
        {
            InozzleService = nozzleService;
        }
        [Route("uploadNozzle")]
        [HttpPost]
        public async Task<IActionResult> uploadNozzle(UploadNozzle uploadNozzle)
        {
            await InozzleService.uploadNozzle(uploadNozzle);
            return Ok(0);
        }
        [Route("GetNozzleInfo")]
        [HttpPost]
        public async Task<List<NozzleInfo>> GetNozzleInfo(int Nozzleid)
        {
            var data = await InozzleService.GetNozzleInfo(Nozzleid);
            return data;
        }
    }
}
