[後端] 水電表 增加判斷jwt
This commit is contained in:
		
							parent
							
								
									5c2bbe0eb6
								
							
						
					
					
						commit
						eb1f84d82b
					
				@ -31,7 +31,12 @@ namespace FrontendWebApi.ApiControllers
 | 
				
			|||||||
        [Route("api/MeterList")]
 | 
					        [Route("api/MeterList")]
 | 
				
			||||||
        public async Task<ActionResult<ApiResult<List<HydroMeterOutput>>>> MeterList([FromBody] HydroMeterInput input)
 | 
					        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";
 | 
					            string tableType = "day week month year";
 | 
				
			||||||
            if (input.building_tag == null)
 | 
					            if (input.building_tag == null)
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
@ -109,7 +114,13 @@ namespace FrontendWebApi.ApiControllers
 | 
				
			|||||||
        [Route("api/WaterList")]
 | 
					        [Route("api/WaterList")]
 | 
				
			||||||
        public async Task<ActionResult<ApiResult<List<HydroMeterOutput>>>> WaterList([FromBody] HydroMeterInput input)
 | 
					        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";
 | 
					            string tableType = "day week month year";
 | 
				
			||||||
            if (input.building_tag == null)
 | 
					            if (input.building_tag == null)
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user