Browse Source

- 규칙 메인 API조회하도록 수

KaRam Kim 8 years ago
parent
commit
eef61d95cf

+ 1 - 1
OneCable/Classes/Definitions.h

@@ -174,7 +174,7 @@ static NSInteger kMaxTimeOut = 60;      //운영
 #define API_POST_DEVICE_TYPES       @"/devices/device_class/%@"  //장치 유형 변경(Device Class)
 
 //40 - Rules
-#define API_GET_RULE            @"/rules"
+#define API_GET_RULE            @"/customer/%@/group/%@/rule"
 #define API_GET_RULE_DETAIL     @"/rules/%@"
 #define API_POST_RULE_STATUS    @"/rules/%@/status"
 #define API_POST_RULE           @"/rules"

+ 5 - 4
OneCable/Classes/ViewControllers/RuelsScreens/RulesViewController.m

@@ -189,12 +189,13 @@
         return;
     }
     
-    NSDictionary *parameter = @{@"rule_id": _pagingId ? _pagingId : ksEmptyString,
-                                @"paging_type": _pagingType ? _pagingType : ksEmptyString};
+//    NSDictionary *parameter = @{@"rule_id": _pagingId ? _pagingId : ksEmptyString,
+//                                @"paging_type": _pagingType ? _pagingType : ksEmptyString};
 
-    NSString *path = [NSString stringWithFormat:API_GET_RULE];
+//    NSString *path = [NSString stringWithFormat:API_GET_RULE];
+    NSString *path = [[JDFacade facade] getUrlWithCustAndGroupID:API_GET_RULE aditional:@""];
 
-    [[RequestHandler handler] sendAsyncGetRequestAPIPath:path parameters:parameter modelClass:[RuleListModel class] completion:^(id responseObject) {
+    [[RequestHandler handler] sendAsyncGetRequestAPIPath:path parameters:nil modelClass:[RuleListModel class] completion:^(id responseObject) {
         if (!responseObject) {//응답결과가 잘못되었거나 없을 경우,
             return;
         }