Update getEvents and getResponses backend routes#212
Merged
jonyTF merged 21 commits intoschej-it:mainfrom Mar 4, 2026
Merged
Conversation
jonyTF
requested changes
Jan 30, 2026
| localStorage[this.guestNameKey] = newName | ||
| // Also store with shortId or _id (to match eventId prop format used in Event.vue) | ||
| const eventIdKey = `${this.event.shortId ?? this.event._id}.guestName` | ||
| localStorage[eventIdKey] = newName |
Member
There was a problem hiding this comment.
what's the point of eventIdKey?
Member
There was a problem hiding this comment.
doesn't seem to be used anywhere, seems redundant with guestNameKey
…regions When opening an event in an anonymous/private browser window, the timezone auto-detection would pick Africa/Casablanca instead of the correct European timezone (e.g. Europe/Belgrade for Prague). This happened because the fallback in getLocalTimezone() only matched on current UTC offset. In winter, both Casablanca (GMT+1, no DST) and Belgrade (CET/CEST) share offset +60, and Casablanca appeared first in the sorted list. Add a DST-aware intermediate matching step that compares UTC offsets at two reference dates (January and July). This distinguishes timezones that observe DST from those that don't: Europe/Belgrade has offsets +60/+120 while Africa/Casablanca has +60/+60, so Prague correctly matches Belgrade. Ref schej-it#136 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
… storage with short id
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #199
Fixes a privacy bug where
GET /api/events/{eventId}andGET /api/events/{eventId}/responsesreturned all responses with full user details despiteblindAvailabilityEnabledbeing set.Solution
Implemented server-side filtering for both endpoints:
getEventEndpointblindAvailabilityEnabledis false OR user is the ownerownerId,numResponses, and filters responses to only include the requester's responseguestNamequery parametergetResponsesEndpointblindAvailabilityEnabledis false OR user is the owneruserIdorguestName)Other Changes
updateEventResponseto prevent non-owners from setting guest availability whenblindAvailabilityEnabledis truesetSlotsplugin API method to reject guest name parameters for non-owners on events withblindAvailabilityEnabledguestNamequery parameter to both endpoints for proper filteringLimitations
One caveat: for private events, a non-owner could technically spoof a guest's availability by guessing a guest name and sending it as a query param. The only real fix would be session-based auth for guests, which feels like overkill since the data isn't very sensitive and guessing guest names isn't trivial.