Skip to content

Commit

Permalink
get all endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
SuliR123 committed Oct 20, 2024
1 parent 097c668 commit c5d7349
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion backend/internal/handlers/venues/routes.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ func Routes(app *fiber.App, params types.Params) {
protected.Delete("/:venueId", service.DeleteVenue)

protected.Delete("/reviews/:reviewId", service.DeleteReviewForVenue)

protected.Get("/:venueId", service.GetVenueFromID)
protected.Get("/search", service.GetVenueFromName)
protected.Get("/getAll", service.GetAllVenues)
Expand Down
2 changes: 1 addition & 1 deletion backend/internal/storage/postgres/venues.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ func (db *DB) DeleteReviewForVenue(ctx context.Context, reviewID int8) error {
return nil
}

func (db *DB) GetVenueFromId(ctx context.Context, id uuid.UUID) (models.Venue, error) {
func (db *DB) GetVenueFromID(ctx context.Context, id uuid.UUID) (models.Venue, error) {
var query = `SELECT venue_id, name, address, city, state, zip_code, created_at FROM "Venue" WHERE venue_id = $1`
rows, err := db.conn.Query(ctx, query, id.String())
if err != nil {
Expand Down

0 comments on commit c5d7349

Please sign in to comment.