mirror of
https://github.com/nextcloud/server.git
synced 2026-04-21 06:08:46 -04:00
enh: does not exist return null
Signed-off-by: Christopher Ng <chrng8@gmail.com>
This commit is contained in:
parent
db7f5a29f3
commit
9bd7ddd074
1 changed files with 4 additions and 1 deletions
|
|
@ -68,7 +68,10 @@ class ApiController extends OCSController {
|
|||
];
|
||||
return new JSONResponse($reminderData, Http::STATUS_OK);
|
||||
} catch (DoesNotExistException $e) {
|
||||
return new JSONResponse([], Http::STATUS_NOT_FOUND);
|
||||
$reminderData = [
|
||||
'dueDate' => null,
|
||||
];
|
||||
return new JSONResponse($reminderData, Http::STATUS_OK);
|
||||
} catch (Throwable $th) {
|
||||
$this->logger->error($th->getMessage(), ['exception' => $th]);
|
||||
return new JSONResponse([], Http::STATUS_INTERNAL_SERVER_ERROR);
|
||||
|
|
|
|||
Loading…
Reference in a new issue