Monotone-Parent: 52de90085e2d18ded0d0c315e7148e1c72feb785

Monotone-Revision: 99d14630f5294d40da6680a39d69b6f1b7853938

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2008-07-17T21:12:43
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Wolfgang Sourdeau
2008-07-17 21:12:43 +00:00
parent e1beed1ba0
commit bdc02c26ab
46 changed files with 1595 additions and 521 deletions
-28
View File
@@ -516,32 +516,4 @@
return self;
}
- (BOOL) isDeletableClientObject
{
return [[self clientObject] respondsToSelector: @selector(delete)];
}
- (id) deleteAction
{
NSException *ex;
if (![self isDeletableClientObject])
/* return 400 == Bad Request */
return [NSException exceptionWithHTTPStatus: 400
reason:@"method cannot be invoked on "
@"the specified object"];
ex = [[self clientObject] delete];
if (ex)
{
// TODO: improve error handling
[self debugWithFormat: @"failed to delete: %@", ex];
return ex;
}
return [self responseWithStatus: 200
andString: [[self clientObject] nameInContainer]];
}
@end /* UIxContactView */