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

Add submission delete endpoint #1174

Merged
merged 4 commits into from
Mar 11, 2024
Merged

Conversation

pkalita-lbl
Copy link
Collaborator

Fixes #1165

  • Adds a handler for DELETE /api/metadata_submission/{id} requests. I figured that only owners (or admins) should be able to delete submissions. I also erred on the side of caution in not allowing the delete if the submission is locked by someone. If you think that could be better let me know.
  • Sort of unrelated, but it would be really helpful to the Field Notes app if the submission list endpoint had a stable sort. I know there have been discussions in the past about full on sorting and filtering of submissions in the portal. But without getting into all that I thought it might be uncontroversial to just sort them by newest by default.

@pkalita-lbl pkalita-lbl requested a review from naglepuff March 7, 2024 20:11
@naglepuff
Copy link
Collaborator

  • Sort of unrelated, but it would be really helpful to the Field Notes app if the submission list endpoint had a stable sort. I know there have been discussions in the past about full on sorting and filtering of submissions in the portal. But without getting into all that I thought it might be uncontroversial to just sort them by newest by default.

This seems reasonable to me. Is there an existing issue documenting this that will be closed by this PR?

@pkalita-lbl pkalita-lbl requested a review from naglepuff March 8, 2024 22:42
@pkalita-lbl
Copy link
Collaborator Author

  • Sort of unrelated, but it would be really helpful to the Field Notes app if the submission list endpoint had a stable sort. I know there have been discussions in the past about full on sorting and filtering of submissions in the portal. But without getting into all that I thought it might be uncontroversial to just sort them by newest by default.

This seems reasonable to me. Is there an existing issue documenting this that will be closed by this PR?

No, just something that's been lingering the back of my mind

Copy link
Collaborator

@naglepuff naglepuff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@pkalita-lbl pkalita-lbl merged commit 6f296a7 into main Mar 11, 2024
2 checks passed
@pkalita-lbl pkalita-lbl deleted the issue-1165-submission-delete branch March 11, 2024 19:01
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

Successfully merging this pull request may close these issues.

Add endpoint to delete SubmissionMetadata records
2 participants