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

BED-4537: Create Share endpoint (continued) #802

Closed
wants to merge 6 commits into from
Closed

Conversation

ALCooper12
Copy link
Contributor

@ALCooper12 ALCooper12 commented Aug 20, 2024

Description

  • Created a new ShareSavedQueries endpoint
  • This PR is a continuation from here: BED-4537: Create Share endpoint #775
  • The purpose of this PR was for handling weird merge conflict issues/clean up

Motivation and Context

  • Ticket: BED-4537
  • Subtask above is from BED-4534

Why is this change required? What problem does it solve?

  • This newly created endpoint will allow users to have the ability to share a query with others, or set it as public

How Has This Been Tested?

  • Passing Unit/Integration tests
  • 3 successfully passing expected api calls via Bruno + database changes
Screenshot 2024-08-20 at 4 55 36 PM Screenshot 2024-08-20 at 4 55 58 PM Screenshot 2024-08-20 at 4 51 08 PM Screenshot 2024-08-20 at 4 51 35 PM Screenshot 2024-08-20 at 5 07 30 PM Screenshot 2024-08-20 at 5 08 18 PM

OpenAPI preview (but please check on how this looks like for you!)
Screenshot 2024-08-20 at 4 17 46 PM

Types of changes

  • New feature (non-breaking change which adds functionality)

Checklist:

@ALCooper12 ALCooper12 added documentation Improvements or additions to documentation enhancement New feature or request api A pull request containing changes affecting the API code. labels Aug 20, 2024
@ALCooper12 ALCooper12 self-assigned this Aug 20, 2024
for _, permission := range savedQueryPermissions {
sharedToUserID := permission.SharedToUserID

if err := s.DB.DeleteSavedQueryPermissionsForUser(request.Context(), int64(savedQueryID), sharedToUserID.UUID); err != nil {
Copy link
Contributor

Choose a reason for hiding this comment

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

Depending on who gets their PR merged first, I have a method on my branch that allows for batch deleting, can simplify this a bit

@ALCooper12 ALCooper12 closed this Aug 26, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Aug 26, 2024
@ALCooper12 ALCooper12 deleted the BED-4537-cleanup branch August 26, 2024 20:35
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
api A pull request containing changes affecting the API code. documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants