|
|
@@ -172,6 +172,29 @@
|
|
|
}];
|
|
|
}
|
|
|
|
|
|
+- (void)requestDeleteModeAction{
|
|
|
+ //parameters
|
|
|
+ NSArray *arr = @[_mode.modeId];
|
|
|
+ NSString *path = [[JDFacade facade] getUrlWithCustAndGroupID:API_DELETE_DEL_HOMEMODE arguments:arr];
|
|
|
+
|
|
|
+ // NSString *path = [NSString stringWithFormat:API_POST_SCENE_HOMEMODE, _mode.modeId];
|
|
|
+
|
|
|
+ [[RequestHandler handler] sendAsyncRequestAPIPath:path
|
|
|
+ method:ksHTTPRequestDELETE
|
|
|
+ parameters:nil
|
|
|
+ modelClass:nil
|
|
|
+ showLoadingView:YES completion:^(id responseObject) {
|
|
|
+ [self dismissViewControllerAnimated:YES completion:^{
|
|
|
+ [[JDFacade facade] toast:NSLocalizedString(@"홈모드 설정을 저장했습니다", @"홈모드 설정을 저장했습니다")];
|
|
|
+ }];
|
|
|
+ } failure:^(id errorObject) {
|
|
|
+ JDErrorModel *error = (JDErrorModel *)errorObject;
|
|
|
+ [[JDFacade facade] alert:error.errorMessage];
|
|
|
+ }];
|
|
|
+
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
#pragma mark - UITableView DataSource & Delegate
|
|
|
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
|
|
|
return 3;
|
|
|
@@ -383,7 +406,8 @@
|
|
|
}
|
|
|
|
|
|
if (!pSubItems.count) {
|
|
|
- [[JDFacade facade] alert:NSLocalizedString(@"실행할 장치를 선택하세요", @"실행할 장치를 선택하세요")];
|
|
|
+// [[JDFacade facade] alert:NSLocalizedString(@"실행할 장치를 선택하세요", @"실행할 장치를 선택하세요")];
|
|
|
+ [self requestDeleteModeAction];
|
|
|
return;
|
|
|
}
|
|
|
|