Coorganizer and MentorRequest afterCreate hooks select ALL events

RESOLVED FIXED

Status

RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: cade, Assigned: cade)

Tracking

Details

Attachments

(1 attachment)

(Assignee)

Description

4 years ago
https://github.com/mozilla/webmaker-events-service/blob/a04deae302efa59999a4ee637f0dda5bd1ec35ad/models/index.js#L140-L142

https://github.com/mozilla/webmaker-events-service/blob/a04deae302efa59999a4ee637f0dda5bd1ec35ad/models/index.js#L89-L91

These functions are silently evil. They should be generating queries for events with matching IDs, but they're really doing:

SELECT * FROM `Events`; (lol)

They need to be wrapped in a `where: {}` object
(Assignee)

Updated

4 years ago
Assignee: nobody → cade

Comment 3

4 years ago
Commit pushed to master at https://github.com/mozilla/webmaker-events-service

https://github.com/mozilla/webmaker-events-service/commit/57b68f518459a8537a6e515e1d31c81820d5089e
Bug 1043374 - Don't select all when looking up events for the Coorganizer and MentorRequest hooks
(Assignee)

Updated

4 years ago
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.