1
This commit is contained in:
@@ -201,6 +201,24 @@
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)restoreThemeWithId:(nullable NSString *)themeId
|
||||
completion:(nullable KBShopRestoreCompletion)completion {
|
||||
if (themeId.length == 0) {
|
||||
if (completion) completion(NO, [self kb_invalidParameterError]);
|
||||
return;
|
||||
}
|
||||
NSDictionary *body = @{@"themeId": [self kb_themeIdParamFromString:themeId]};
|
||||
[[KBNetworkManager shared] POST:API_THEME_RESTORE
|
||||
jsonBody:body
|
||||
headers:nil
|
||||
autoShowBusinessError:NO
|
||||
completion:^(NSDictionary * _Nullable json,
|
||||
NSURLResponse * _Nullable response,
|
||||
NSError * _Nullable error) {
|
||||
if (completion) completion(error == nil, error);
|
||||
}];
|
||||
}
|
||||
|
||||
- (id)kb_themeIdParamFromString:(NSString *)themeId {
|
||||
if (themeId.length == 0) { return @""; }
|
||||
NSNumberFormatter *formatter = [NSNumberFormatter new];
|
||||
|
||||
Reference in New Issue
Block a user