-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expose dashboard layout and statuses API #42973
Expose dashboard layout and statuses API #42973
Conversation
* 200: Statuses updated successfully | ||
*/ | ||
public function updateLayout(array $layout): DataResponse { | ||
$this->config->setUserValue($this->userId, 'dashboard', 'layout', implode(',', $layout)); |
Check notice
Code scanning / Psalm
PossiblyNullArgument Note
* 200: Statuses updated successfully | ||
*/ | ||
public function updateStatuses(array $statuses): DataResponse { | ||
$this->config->setUserValue($this->userId, 'dashboard', 'statuses', implode(',', $statuses)); |
Check notice
Code scanning / Psalm
PossiblyNullArgument Note
* @return list<string> | ||
*/ | ||
public function getLayout(): array { | ||
$systemDefault = $this->config->getAppValue('dashboard', 'layout', 'recommendations,spreed,mail,calendar'); |
Check notice
Code scanning / Psalm
DeprecatedMethod Note
2806714
to
072b239
Compare
072b239
to
f49618c
Compare
f49618c
to
571ce41
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. A few minor change suggestions.
571ce41
to
823e801
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested and works.
Nit: I would prefer the new routes to be /api/v1/...
as they are the first versions of the respective APIs.
Yeah I first had them as v1, but I'm not sure what makes most sense here. To me it would feel a bit weird that older versions support v2 but not all of the updated v1, so I went with v3 instead 🤷♀️ |
Signed-off-by: provokateurin <[email protected]>
Signed-off-by: provokateurin <[email protected]>
…r format Signed-off-by: provokateurin <[email protected]>
Signed-off-by: provokateurin <[email protected]>
Signed-off-by: provokateurin <[email protected]>
823e801
to
395bf7c
Compare
Just a rebase to fix CI |
Summary
I cleaned up the format that was used by the API, migrated the existing endpoints to OCS (the LayoutApiController never had a route so it was not possible to update the layout or statuses before) and added endpoints to get the current layout and statuses.
Checklist