Skip to content

Commit

Permalink
update event registration regex
Browse files Browse the repository at this point in the history
  • Loading branch information
fixterjake committed Jan 28, 2024
1 parent 26571ee commit a320fb1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion controllers/EventController.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ router.put('/:slug/signup', getUser, async (req, res) => {
}

for(const r of req.body.requests) {
if((/^([A-Z]{2,3})(_([A-Z]{1,3}))?_(DEL|GND|TWR|APP|DEP|CTR)$/.test(r) || r.toLowerCase() === "any") === false) {
if((/^([A-Z]{2,3})(_([0-9]{1,3}|[A-Z]{1,3}))?_(DEL|GND|TWR|APP|DEP|CTR)$/.test(r) || r.toLowerCase() === "any") === false) {
throw {
code: 400,
message: "Request must be a valid callsign or 'Any'"
Expand Down

0 comments on commit a320fb1

Please sign in to comment.