Class DriverRepo

java.lang.Object
com.example.vehicletaxsystem.repositories.DriverRepo

@RestController @RequestMapping("/api/driver") public class DriverRepo extends Object
Repository class linked to drivers for setting the endpoints to be exposed to the client and calling the service class to handle requests.
  • Field Details

  • Constructor Details

  • Method Details

    • getAllDrivers

      @GetMapping("/admin") public List<DriverDTO> getAllDrivers()
    • getDriverDTOByLicenceNo

      @GetMapping("/user/{licenceNo}") public DriverDTO getDriverDTOByLicenceNo(@PathVariable("licenceNo") int licenceNo)
    • updateDriverEmail

      @PostMapping("/user/{licenceNo}") public DriverDTO updateDriverEmail(@PathVariable int licenceNo, @RequestBody DriverDTO driverDTO)