Monotone-Parent: 48ab3ba04ae37aa55ddec9a67b39c8be57786c6d

Monotone-Revision: 66fc4d9ee925358de80c05092a80e0b39ae6c95d

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2007-09-11T19:41:40
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Wolfgang Sourdeau committed 2007-09-11 19:41:40 +00:00
1 parent 956f628360
commit f2e7a70a2c
5 files changed
+54 -88

No files matched your search

+29 -16
View File
@@ -94,10 +94,7 @@
response = [[self clientObject] trashInContext: context];
if (!response)
{
response = [context response];
[response setStatus: 204];
}
response = [self responseWith204];
return response;
}
@@ -113,10 +110,7 @@
response = [[self clientObject] moveToFolderNamed: destinationFolder
inContext: context];
if (!response)
{
response = [context response];
[response setStatus: 204];
}
response = [self responseWith204];
}
else
response = [NSException exceptionWithHTTPStatus: 500 /* Server Error */
@@ -125,6 +119,30 @@
return response;
}
/* active message */
- (id) markMessageUnreadAction
{
id response;
response = [[self clientObject] removeFlags: @"seen"];
if (!response)
response = [self responseWith204];
return response;
}
- (id) markMessageReadAction
{
id response;
response = [[self clientObject] addFlags: @"seen"];
if (!response)
response = [self responseWith204];
return response;
}
/* SOGoDraftObject */
- (WOResponse *) editAction
{
@@ -158,10 +176,7 @@
if (error)
response = error;
else
{
response = [context response];
[response setStatus: 204];
}
response = [self responseWith204];
return response;
}
@@ -171,17 +186,15 @@
WOResponse *response;
NSString *filename;
response = [context response];
filename = [[context request] formValueForKey: @"filename"];
if ([filename length] > 0)
{
response = [self responseWith204];
[[self clientObject] deleteAttachmentWithName: filename];
[response setStatus: 204];
}
else
{
[response setStatus: 500];
response = [self responseWithStatus: 500];
[response appendContentString: @"How did you end up here?"];
}