Add creation & deletion of addressbooks

This commit is contained in:
Francis Lachapelle committed 2014-11-11 22:31:28 -05:00
1 parent 2672f1a8fc
commit 87cc6bed7c
10 files changed
+308 -62

No files matched your search

+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;
}