Add creation & deletion of addressbooks

This commit is contained in:
Francis Lachapelle
2014-09-10 16:20:52 -04:00
parent 2672f1a8fc
commit 87cc6bed7c
10 changed files with 308 additions and 62 deletions
+15 -2
View File
@@ -23,12 +23,16 @@
#import <Foundation/NSArray.h>
#import <Foundation/NSString.h>
#import <NGObjWeb/NSException+HTTP.h>
#import <NGObjWeb/WOContext+SoObjects.h>
#import <NGObjWeb/WORequest.h>
#import <NGObjWeb/WOResponse.h>
#import <SoObjects/SOGo/SOGoObject.h>
#import <SoObjects/SOGo/SOGoPermissions.h>
#import <SOGo/NSDictionary+Utilities.h>
#import "WODirectAction+SOGo.h"
#import "UIxObjectActions.h"
@@ -74,10 +78,19 @@
- (WOResponse *) deleteAction
{
WOResponse *response;
NSDictionary *data;
response = (WOResponse *) [[self clientObject] delete];
if (!response)
response = [self responseWithStatus: 204];
if (response)
{
data = [NSDictionary dictionaryWithObjectsAndKeys: [(NSException *) response reason], @"error", nil];
response = [self responseWithStatus: 403
andString: [data jsonRepresentation]];
}
else
{
response = [self responseWithStatus: 204];
}
return response;
}