File tree Expand file tree Collapse file tree 2 files changed +11
-10
lines changed
Sources/WordPressKit/Services Expand file tree Collapse file tree 2 files changed +11
-10
lines changed Original file line number Diff line number Diff line change 30
30
*/
31
31
- (void )updateCommentWithID : (NSNumber * _Nonnull)commentID
32
32
content : (NSString * _Nonnull)content
33
- success : (void (^ _Nullable)( void ))success
33
+ success : (void (^)(RemoteComment *comment ))success
34
34
failure : (void (^ _Nullable)(NSError * _Nullable error))failure ;
35
35
36
36
/* *
Original file line number Diff line number Diff line change @@ -246,7 +246,7 @@ - (void)syncHierarchicalCommentsForPost:(NSNumber *)postID
246
246
247
247
- (void )updateCommentWithID : (NSNumber *)commentID
248
248
content : (NSString *)content
249
- success : (void (^)(void ))success
249
+ success : (void (^)(RemoteComment *comment ))success
250
250
failure : (void (^)(NSError *error))failure
251
251
{
252
252
NSString *path = [NSString stringWithFormat: @" sites/%@ /comments/%@ " , self .siteID, commentID];
@@ -260,14 +260,15 @@ - (void)updateCommentWithID:(NSNumber *)commentID
260
260
[self .wordPressComRESTAPI post: requestUrl
261
261
parameters: parameters
262
262
success: ^(id responseObject, NSHTTPURLResponse *httpResponse) {
263
- if (success) {
264
- success ();
265
- }
266
- } failure: ^(NSError *error, NSHTTPURLResponse *httpResponse) {
267
- if (failure) {
268
- failure (error);
269
- }
270
- }];
263
+ RemoteComment *comment = [self remoteCommentFromJSONDictionary: responseObject];
264
+ if (success) {
265
+ success (comment);
266
+ }
267
+ } failure: ^(NSError *error, NSHTTPURLResponse *httpResponse) {
268
+ if (failure) {
269
+ failure (error);
270
+ }
271
+ }];
271
272
}
272
273
273
274
- (void )replyToPostWithID : (NSNumber *)postID
You can’t perform that action at this time.
0 commit comments