From eb1f84d82b56997da8f5e705ce664acc18d9735a Mon Sep 17 00:00:00 2001 From: dev02 Date: Fri, 12 May 2023 09:39:44 +0800 Subject: [PATCH] =?UTF-8?q?[=E5=BE=8C=E7=AB=AF]=20=E6=B0=B4=E9=9B=BB?= =?UTF-8?q?=E8=A1=A8=20=E5=A2=9E=E5=8A=A0=E5=88=A4=E6=96=B7jwt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ApiControllers/HydroMeterController.cs | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/FrontendWebApi/ApiControllers/HydroMeterController.cs b/FrontendWebApi/ApiControllers/HydroMeterController.cs index d6d2f2a..6782602 100644 --- a/FrontendWebApi/ApiControllers/HydroMeterController.cs +++ b/FrontendWebApi/ApiControllers/HydroMeterController.cs @@ -31,7 +31,12 @@ namespace FrontendWebApi.ApiControllers [Route("api/MeterList")] public async Task>>> MeterList([FromBody] HydroMeterInput input) { - ApiResult> apiResult = new ApiResult>(); + ApiResult> apiResult = new ApiResult>(jwt_str); + if (!jwtlife) + { + apiResult.Code = "5000"; + return BadRequest(apiResult); + } string tableType = "day week month year"; if (input.building_tag == null) { @@ -109,7 +114,13 @@ namespace FrontendWebApi.ApiControllers [Route("api/WaterList")] public async Task>>> WaterList([FromBody] HydroMeterInput input) { - ApiResult> apiResult = new ApiResult>(); + ApiResult> apiResult = new ApiResult>(jwt_str); + if (!jwtlife) + { + apiResult.Code = "5000"; + return BadRequest(apiResult); + } + string tableType = "day week month year"; if (input.building_tag == null) {