Add verification of parameter for "foldersSearch"
parent
6395d7cd6a
commit
55f0d5a959
|
@ -542,11 +542,18 @@
|
|||
id <WOActionResults> result;
|
||||
SOGoUserFolder *userFolder;
|
||||
|
||||
|
||||
folderType = [self queryParameterForKey: @"type"];
|
||||
if ([folderType length])
|
||||
{
|
||||
userFolder = [self clientObject];
|
||||
folders = [userFolder foldersOfType: folderType
|
||||
forUID: [userFolder ownerInContext: context]];
|
||||
result = [self _foldersResponseForResults: folders];
|
||||
}
|
||||
else
|
||||
result = [NSException exceptionWithHTTPStatus: 400
|
||||
reason: @"missing 'type' parameter"];
|
||||
|
||||
return result;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue