using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; using Znyc.CloudCar.IServices.Certification; using Znyc.CloudCar.Model.Dtos.Certification; using Znyc.CloudCar.Model.ViewModels.ReportsCallBack; namespace Znyc.CloudCar.Controller { /// /// 实名认证管理 /// public class CertificationController : ControllerBase { private readonly ICertificationService _certificationService; public CertificationController( ICertificationService certificationService ) { _certificationService = certificationService; } /// /// 查询实名认证信息 /// /// [HttpGet] [Authorize] [Route("api/v1/certification")] public async Task GetAsync() { return await _certificationService.GetAsync(); } /// /// 新增实名认证信息 /// /// /// [HttpPost] [Authorize] [Route("api/v1/certification")] public async Task AddAsync([FromBody] CertificationAddInput certificationAddInput) { return await _certificationService.AddAsync(certificationAddInput); } /// /// 更新实名认证信息 /// /// /// [HttpPut] [Authorize] [Route("api/v1/certification/update")] public async Task UpdateAsync([FromBody] CertificationUpdateInput certificationUpdateInput) { return await _certificationService.UpdateAsync(certificationUpdateInput); } } }