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

Refactor API to separate deletes, removes, and locks from updates. #686

Closed
dessalines opened this issue May 1, 2020 · 0 comments · Fixed by #997
Closed

Refactor API to separate deletes, removes, and locks from updates. #686

dessalines opened this issue May 1, 2020 · 0 comments · Fixed by #997
Labels
enhancement New feature or request

Comments

@dessalines
Copy link
Member

dessalines commented May 1, 2020

Currently in the API, there isn't a separate endpoint / action for comment delete for example. A delete, is really a comment update, which sets an optional delete value in the form to True or False, and then sets the deleted column in the sql row. Same goes for lock, remove, etc.

It would be a good idea to separate these, both as separate API actions, and also create DB helper methods, which only update that specific column.

I still have to come up with all the actions that set simple booleans on the rows, but I think its

  • Posts: delete, remove, lock, sticky.
  • Comments: delete, remove, read
  • Communities: delete, remove
  • UserMention: read
  • PrivateMessage: read, delete
  • Users: This is good.

Comments from other thread:

A lot of API actions are currently Post edits, Comment edits, and they should be split out into separate API endpoints / actions. It grew this way organically, but its less than ideal, and we've run into a lot of permissions issues now that seem arbitrary.

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

Successfully merging a pull request may close this issue.

1 participant