Expose dashboard layout and statuses API#42973
Merged
provokateurin merged 5 commits intomasterfrom May 10, 2024
Merged
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
| * 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
| * @return list<string> | ||
| */ | ||
| public function getLayout(): array { | ||
| $systemDefault = $this->config->getAppValue('dashboard', 'layout', 'recommendations,spreed,mail,calendar'); |
Check notice
Code scanning / Psalm
DeprecatedMethod
2806714 to
072b239
Compare
072b239 to
f49618c
Compare
f49618c to
571ce41
Compare
This was referenced Mar 12, 2024
Merged
Merged
Merged
julien-nc
requested changes
May 3, 2024
Member
julien-nc
left a comment
There was a problem hiding this comment.
Looks good. A few minor change suggestions.
571ce41 to
823e801
Compare
st3iny
approved these changes
May 10, 2024
Member
st3iny
left a comment
There was a problem hiding this comment.
Tested and works.
Nit: I would prefer the new routes to be /api/v1/... as they are the first versions of the respective APIs.
Member
Author
|
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 <kate@provokateurin.de>
Signed-off-by: provokateurin <kate@provokateurin.de>
…r format Signed-off-by: provokateurin <kate@provokateurin.de>
Signed-off-by: provokateurin <kate@provokateurin.de>
Signed-off-by: provokateurin <kate@provokateurin.de>
823e801 to
395bf7c
Compare
Member
Author
|
Just a rebase to fix CI |
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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