[後端] 水電表 增加判斷jwt

This commit is contained in:
dev02 2023-05-12 09:39:44 +08:00
parent 5c2bbe0eb6
commit eb1f84d82b

View File

@ -31,7 +31,12 @@ namespace FrontendWebApi.ApiControllers
[Route("api/MeterList")]
public async Task<ActionResult<ApiResult<List<HydroMeterOutput>>>> MeterList([FromBody] HydroMeterInput input)
{
ApiResult<List<HydroMeterOutput>> apiResult = new ApiResult<List<HydroMeterOutput>>();
ApiResult<List<HydroMeterOutput>> apiResult = new ApiResult<List<HydroMeterOutput>>(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<ActionResult<ApiResult<List<HydroMeterOutput>>>> WaterList([FromBody] HydroMeterInput input)
{
ApiResult<List<HydroMeterOutput>> apiResult = new ApiResult<List<HydroMeterOutput>>();
ApiResult<List<HydroMeterOutput>> apiResult = new ApiResult<List<HydroMeterOutput>>(jwt_str);
if (!jwtlife)
{
apiResult.Code = "5000";
return BadRequest(apiResult);
}
string tableType = "day week month year";
if (input.building_tag == null)
{