API documentation for batchDelete
Also return a proper JSON-payload in case of an error
This commit is contained in:
parent
7d54bd5e86
commit
2b6d9db83a
|
@ -298,6 +298,20 @@
|
|||
return response;
|
||||
}
|
||||
|
||||
/**
|
||||
* @api {post} /so/:username/:folderPath/batchDelete?uids=:uids Delete multiple resources
|
||||
* @apiVersion 1.0.0
|
||||
* @apiName GetBatchDelete
|
||||
* @apiGroup Common
|
||||
* @apiExample {curl} Example usage:
|
||||
* curl -i http://localhost/SOGo/so/sogo1/Contacts/personal/batchDelete \
|
||||
* -H 'Content-Type: application/json' \
|
||||
* -d '{ "uids": ["1BC8-52F53F80-1-38C52041.vcf", "4095-52B0C180-31-9225E71.vlf"] }'
|
||||
*
|
||||
* @apiParam {String[]} uids List of resources IDs
|
||||
*
|
||||
* @apiError (Error 400) {Object} error The error message
|
||||
*/
|
||||
- (id) batchDeleteAction
|
||||
{
|
||||
WOResponse *response;
|
||||
|
@ -315,8 +329,9 @@
|
|||
}
|
||||
else
|
||||
{
|
||||
response = [self responseWithStatus: 500];
|
||||
[response appendContentString: @"At least 1 id required."];
|
||||
response = [self responseWithStatus: 400
|
||||
andJSONRepresentation: [NSDictionary dictionaryWithObject: @"At least 1 id required."
|
||||
forKey: @"error"]];
|
||||
}
|
||||
|
||||
return response;
|
||||
|
|
Loading…
Reference in a new issue