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

Driver Availability: Add controller GET by id endpoint for driver availability #57

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

JosephLiCodes
Copy link
Contributor

@JosephLiCodes JosephLiCodes commented Mar 7, 2024

In this pr, I added the get by id endpoint for driver availability controller

DriverAvailabilityController

  • GET /api/driverAvailability?id=123 that gets an availability submission if owned by the current user.
  • Test for the API endpoint GET by id
    image

close #45

calee14
calee14 previously approved these changes Mar 8, 2024
Copy link
Contributor

@calee14 calee14 left a comment

Choose a reason for hiding this comment

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

LGTM

cydthe
cydthe previously approved these changes Mar 8, 2024
Copy link
Contributor

@cydthe cydthe left a comment

Choose a reason for hiding this comment

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

LGTM

@wzqd wzqd changed the title Driver availability controllerpt5 Driver Availability: Add controller GET by id endpoint for driver availability Mar 8, 2024
@wzqd wzqd dismissed stale reviews from cydthe and calee14 via 613dde3 March 8, 2024 01:21
calee14
calee14 previously approved these changes Mar 8, 2024
cydthe
cydthe previously approved these changes Mar 8, 2024
Copy link
Contributor

@cydthe cydthe left a comment

Choose a reason for hiding this comment

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

Looks good to me!

}

@Operation(summary = "Get a single availability by id, if user owns it")
@PreAuthorize("hasRole('ROLE_USER')")
Copy link
Contributor

Choose a reason for hiding this comment

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

Same thing as last PR, user wont be able to get anything, better to just be ROLE_DRIVER even if just user is not dangerous

@JosephLiCodes JosephLiCodes force-pushed the driverAvailabilityControllerpt5 branch from c93527e to 1307aed Compare March 15, 2024 00:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Driver Availability: Add controller GET by id endpoint for driver availability
4 participants