using Infrastructure;
using Microsoft.AspNetCore.Mvc;
using OpenAuth.App.ServiceApp.LayerManagerApp;
using OpenAuth.App.ServiceApp.LayerManagerApp.Request;

namespace OpenAuth.WebApi.Controllers.ServiceControllers.DataMaintenance;

/// <summary>
///  图层
/// </summary>
[Route("api/[controller]/[action]")]
[ApiController]
public class LayerController : ControllerBase
{
    private readonly LayerApp _app;

    public LayerController(LayerApp layerApp)
    {
        _app = layerApp;
    }

    /// <summary>
    ///  excel 上传
    /// </summary>
    /// <param name="req"></param>
    /// <returns></returns>
    [HttpPost]
    public async Task<Response<bool>> UploadExcel(LayerReq req)
    {
        return await _app.UploadExcel(req);
    }

    /// <summary>
    /// shape文件上传
    /// </summary>
    /// <param name="req"></param>
    /// <returns></returns>
    [HttpPost]
    public async Task<Response<bool>> UploadShape(LayerReq req)
    {
        return await _app.UploadShape(req);
    }
}