mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-10-06 20:37:14 +00:00
Improve JSON responses from server
This commit is contained in:
1 parent
38e5588c67
commit
5e978940f9
3 files changed
+17
-11
No files matched your search
@@ -814,6 +814,7 @@ static NSArray *infoKeys = nil;
|
||||
NSMutableArray *errorMsg;
|
||||
NSDictionary *messageSubmissions;
|
||||
SOGoSystemDefaults *dd;
|
||||
id <WOActionResults> response;
|
||||
|
||||
int messages_count, recipients_count;
|
||||
|
||||
@@ -878,6 +879,8 @@ static NSArray *infoKeys = nil;
|
||||
[errorMsg componentsJoinedByString: @"\n"],
|
||||
@"message",
|
||||
nil];
|
||||
response = [self responseWithStatus: 405
|
||||
andJSONRepresentation: jsonResponse];
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -886,6 +889,8 @@ static NSArray *infoKeys = nil;
|
||||
[co sourceFolder], @"sourceFolder",
|
||||
[NSNumber numberWithInt: [co sourceIMAP4ID]], @"sourceMessageID",
|
||||
nil];
|
||||
response = [self responseWithStatus: 200
|
||||
andJSONRepresentation: jsonResponse];
|
||||
|
||||
recipients_count += [[co allRecipients] count];
|
||||
messages_count += 1;
|
||||
@@ -898,8 +903,7 @@ static NSArray *infoKeys = nil;
|
||||
}
|
||||
}
|
||||
|
||||
return [self responseWithStatus: 200
|
||||
andString: [jsonResponse jsonRepresentation]];
|
||||
return response;
|
||||
}
|
||||
|
||||
@end /* UIxMailEditor */
|
||||
Reference in new issue
Block a user