Skip to content

Commit f38c81b

Browse files
author
Julien Veyssier
committed
use GET for dashboard client API
Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
1 parent 23930c3 commit f38c81b

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

apps/dashboard/appinfo/routes.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,6 @@
3333
['name' => 'dashboard#setBackground', 'url' => '/background/{type}', 'verb' => 'POST'],
3434
],
3535
'ocs' => [
36-
['name' => 'dashboard#getWidgetItems', 'url' => '/api/v1/widget-items', 'verb' => 'POST'],
36+
['name' => 'dashboard#getWidgetItems', 'url' => '/api/v1/widget-items', 'verb' => 'GET'],
3737
]
3838
];

apps/dashboard/lib/Controller/DashboardController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ public function getBackground(): Http\Response {
215215

216216
/**
217217
* Example request with Curl:
218-
* curl -u user:passwd http://my.nc/ocs/v2.php/apps/dashboard/api/v1/widget-items -H Content-Type:application/json -X POST -d '{"sinceIds":{"github_notifications":"2021-03-22T15:01:10Z"}}'
218+
* curl -u user:passwd http://my.nc/ocs/v2.php/apps/dashboard/api/v1/widget-items -H Content-Type:application/json -X GET -d '{"sinceIds":{"github_notifications":"2021-03-22T15:01:10Z"}}'
219219
*
220220
* @param array $sinceIds Array indexed by widget Ids, contains date/id from which we want the new items
221221
* @param int $limit Limit number of result items per widget

0 commit comments

Comments
 (0)