mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-06-17 08:04:18 +00:00
fix(calendar): do not transmit og http status to external calendar
This commit is contained in:
@@ -148,14 +148,26 @@
|
||||
*/
|
||||
- (WOResponse *) reloadAction
|
||||
{
|
||||
NSDictionary *results;
|
||||
NSMutableDictionary *results;
|
||||
NSString *error;
|
||||
unsigned int httpCode;
|
||||
|
||||
httpCode = 200;
|
||||
results = [[self clientObject] loadWebCalendar];
|
||||
|
||||
|
||||
if ([results objectForKey: @"status"])
|
||||
httpCode = [[results objectForKey: @"status"] intValue];
|
||||
{
|
||||
if ([results objectForKey: @"error"])
|
||||
{
|
||||
error = [results objectForKey: @"error"];
|
||||
if ([error isEqualToString: @"need-auth"])
|
||||
httpCode = 401;
|
||||
if ([error isEqualToString: @"invalid-calendar-content"] || [error isEqualToString: @"http-error"])
|
||||
httpCode = 500;
|
||||
}
|
||||
[results removeObjectForKey:@"status"];
|
||||
}
|
||||
|
||||
return [self responseWithStatus: httpCode andJSONRepresentation: results];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user