Skip to content
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

"POST /boards/{boardId}/undo_delete" API endpoint unexpected behavior #5665

Open
ESilva15 opened this issue Mar 15, 2024 · 0 comments
Open

Comments

@ESilva15
Copy link

ESilva15 commented Mar 15, 2024

Hello, I'm trying to use the Deck API but have found an obstacle with the "undo_delete" endpoint. Which may or may not contain a problem in between the chair and the monitor.

I create a board, delete it and try to undo its deletion all with the same user.

Steps to reproduce:

curl -X POST 'https://username:password@nextcloud.local/index.php/apps/deck/api/v1.0/boards' \
  -H 'Accept: application/json' \
  -H "Content-Type: application/json" \
  -H 'OCS-APIRequest: true' \
   --data-raw '{"title":"A board","color":"FF00FF"}'

This will create the board and successfully return its data.

curl -X DELETE 'https://username:password@nextcloud.local/index.php/apps/deck/api/v1.0/boards/31' \
  -H 'Accept: application/json' \
  -H "Content-Type: application/json" \
  -H 'OCS-APIRequest: true'

Deletes the board as expected given the docs.

Now to undo that we would use:

curl -X POST 'https://username:password@nextcloud.local/index.php/apps/deck/api/v1.0/boards/31/undo_delete' \
  -H 'Accept: application/json' \
  -H "Content-Type: application/json" \
  -H 'OCS-APIRequest: true'

I would be expecting this to undo the board deletion but the reply I get from the server is the HTTP code 403.
(curl also gives curl: (8) Weird server reply)

The board has the following permissions:

"permissions": {
  "PERMISSION_READ": true,
  "PERMISSION_EDIT": true,
  "PERMISSION_MANAGE": true,
  "PERMISSION_SHARE": true
},

Am I approaching this wrong?
Is the user that created the board unable to undo its deletion?

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant