bcgov / bcgov/reserve-rec-api

Bookings API: save the pass type and park image on the booking

Open Beginner friendly
#490 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
2
Forks
7
Avg merge
15h 49m
Merged PRs (30d)
57

Description

Related: https://github.com/bcgov/reserve-rec-public/issues/687

**Bug:** the API saves the pass type from the wrong record. `bookings/methods.js` reads `product.activitySubType` — products don't have that field, activities do. So it saves nothing, and every booking is missing its pass type.

**Two changes:**
1. Read the pass type from the activity record, not the product.
2. Return the park image (`geozoneImageUrl`) on bookings, the same way the park name already is.

**Why it matters:** with both on the booking, the My bookings page needs one API call instead of three — the ~1 second delay before the image and pass type appear goes away.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in bookings/methods.js, where the booking currently reads the pass type and returns the park name. Trace the activity and product records and the existing park-name response, then verify that bookings contain the activity pass type and geozoneImageUrl so the client can obtain both from one API call.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
api, backend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
78/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.