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 all endpoint for driver availability and tests #56

Open
wants to merge 3 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 get all endpoint for driver availabilities controller.

DriverAvailabilityController

  • There is an endpoint GET /api/driverAvailability that gets all availability submissions for the current user.
  • Test for the API endpoint GET all

image

close #46

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 add User getallUserDriverAvailabilities method in controller and tests as well Driver Availability: Add controller GET all endpoint for driver availability and tests Mar 8, 2024
@wzqd wzqd dismissed stale reviews from cydthe and calee14 via f2d2b61 March 8, 2024 01:24
@@ -102,5 +101,15 @@ public Object deleteDriverAvailability(

return genericMessage("DriverAvailability with id %s deleted".formatted(id));
}

@Operation(summary = "List all availabilities of current user")
@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.

Technically user will never be able to get anything since they cant create one in the first place, not dangerous but its better if we just do has role driver

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

@JosephLiCodes JosephLiCodes force-pushed the driverAvailabilityControllerpt3 branch from 4e25c36 to cc7be1a Compare March 15, 2024 00:32
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 all endpoint for driver availability
5 participants