From b0a242a431e6e8b1864603a8af0787d5954ec00d Mon Sep 17 00:00:00 2001 From: "jay.chang" Date: Tue, 16 Apr 2024 15:17:25 +0800 Subject: [PATCH] =?UTF-8?q?[WebApi]=E4=BF=AE=E6=94=B9=E7=87=88=E6=8E=A7?= =?UTF-8?q?=E6=8E=92=E7=A8=8BBUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- FrontendWebApi/ApiControllers/LightScheduleController.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/FrontendWebApi/ApiControllers/LightScheduleController.cs b/FrontendWebApi/ApiControllers/LightScheduleController.cs index 30aae51..5e7e7b2 100644 --- a/FrontendWebApi/ApiControllers/LightScheduleController.cs +++ b/FrontendWebApi/ApiControllers/LightScheduleController.cs @@ -328,8 +328,7 @@ namespace FrontendWebApi.ApiControllers } var deviceNumList = await backendRepository.GetAllAsync(@$"select d.device_number from schedule_device sd left join device d on sd.device_guid = d.device_guid - where light_schedule_guid = ' - {guid}'"); + where light_schedule_guid = '{guid}'"); var variableObix = await backendRepository.GetAllAsync("SELECT system_value as Value, system_key as Name FROM variable WHERE deleted = 0 AND system_type = 'obixConfig'"); string url = variableObix.Where(x => x.Name == "ApiBase").Select(x => x.Value).FirstOrDefault(); @@ -338,7 +337,7 @@ namespace FrontendWebApi.ApiControllers foreach (var deviceNum in deviceNumList) { var d = deviceNum.Split("_"); - var html = $"{url}/obix/config/Arena/" + $"{d[0]}/{d[1]}/{d[2]}/{d[3]}/{deviceNum}/SSC/set"; + var html = $"{url}obix/config/Arena/" + $"{d[0]}/{d[1]}/{d[2]}/{d[3]}/{deviceNum}/SSC/set"; string authInfo = account + ":" + pass; authInfo = Convert.ToBase64String(Encoding.Default.GetBytes(authInfo)); HttpWebRequest request = (HttpWebRequest)WebRequest.Create(html);