This commit is contained in:
2025-12-11 18:36:14 +08:00
parent 14637a21ad
commit cccced6afa
5 changed files with 92 additions and 13 deletions

View File

@@ -114,6 +114,32 @@ NSString * const KBUserCharacterDeletedNotification = @"KBUserCharacterDeletedNo
}];
}
- (void)deletePurchasedThemesWithThemeIds:(NSArray<NSNumber *> *)themeIds
completion:(KBDeleteThemesCompletion)completion {
if (themeIds.count == 0) {
if (completion) {
NSError *e = [NSError errorWithDomain:KBNetworkErrorDomain
code:KBNetworkErrorInvalidResponse
userInfo:@{NSLocalizedDescriptionKey: KBLocalized(@"Invalid parameter")}];
completion(NO, e);
}
return;
}
NSDictionary *params = @{@"themeIds": themeIds};
[[KBNetworkManager shared] POST:API_THEME_BATCH_DELETE
jsonBody:params
headers:nil
autoShowBusinessError:YES
completion:^(NSDictionary * _Nullable json,
NSURLResponse * _Nullable response,
NSError * _Nullable error) {
if (completion) {
completion(error == nil, error);
}
}];
}
///
- (void)updateUserCharacterSortWithSortArray:(NSArray<NSNumber *> *)sortArray
completion:(KBUpdateCharacterSortCompletion)completion {