Skip to content

Commit

Permalink
added mapImageURL (#147)
Browse files Browse the repository at this point in the history
Co-authored-by: Alex Yang <32620988+DatProJack@users.noreply.github.com>
  • Loading branch information
aletya and aletya authored Jan 20, 2024
1 parent a528446 commit 16ed62f
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 7 deletions.
1 change: 1 addition & 0 deletions src/services/event/event-formats.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export interface BaseEventFormat {
locations: Location[];
isAsync: boolean;
isStaff: boolean;
mapImageURL?: string;
}

// Interface for the attendee event
Expand Down
1 change: 1 addition & 0 deletions src/services/event/event-models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,5 @@ export interface FilteredEventView {
eventType: PUBLIC_EVENT_TYPE;
points: number;
isAsync: boolean;
mapImageURL?: string;
}
4 changes: 2 additions & 2 deletions src/services/event/event-router.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { describe, expect, it, beforeEach } from "@jest/globals";
import { EventFollowers, EventMetadata } from "database/event-db.js";
import { AttendeeFollowing } from "database/attendee-db.js";
import { EventFollowers, EventMetadata } from "../../database/event-db.js";
import { AttendeeFollowing } from "../../database/attendee-db.js";
import Models from "../../database/models.js";
import { StatusCode } from "status-code-enum";
import { TESTER, getAsAttendee, getAsStaff } from "../../testTools.js";
Expand Down
19 changes: 14 additions & 5 deletions src/services/event/event-router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,8 @@ eventsRouter.get("/followers/", strongJwtVerification, async (req: Request, res:
* "isStaff": true,
* "isPrivate": true,
* "isAsync": true,
* "displayOnStaffCheckIn": true
* "displayOnStaffCheckIn": true,
* "mapImageURL": "someurlmapthingy.com",
* }
* }
*
Expand Down Expand Up @@ -148,7 +149,8 @@ eventsRouter.get("/staff/", strongJwtVerification, async (_: Request, res: Respo
* }
* ],
* "sponsor": "Example sponsor",
* "eventType": "WORKSHOP"
* "eventType": "WORKSHOP",
* "mapImageURL": "someurlmapthingy.com",
* }
* }
* @apiSuccessExample Example Success Response (Staff POV)
Expand All @@ -172,6 +174,7 @@ eventsRouter.get("/staff/", strongJwtVerification, async (_: Request, res: Respo
* "eventType": "WORKSHOP",
* "isPrivate": True,
* "displayOnStaffCheckIn": True,
* "mapImageURL": "someurlmapthingy.com",
* }
* }
*
Expand Down Expand Up @@ -244,7 +247,8 @@ eventsRouter.get("/:EVENTID/", weakJwtVerification, async (req: Request, res: Re
* }
* ],
* "sponsor": "Example sponsor",
* "eventType": "WORKSHOP"
* "eventType": "WORKSHOP",
* "mapImageURL": "someurlmapthingy.com",
* },
* // Additional events...
* ]
Expand Down Expand Up @@ -272,6 +276,7 @@ eventsRouter.get("/:EVENTID/", weakJwtVerification, async (req: Request, res: Re
* "eventType": "WORKSHOP",
* "isPrivate": true,
* "displayOnStaffCheckIn": true,
* "mapImageURL": "someurlmapthingy.com",
* },
* // Additional events...
* ]
Expand Down Expand Up @@ -325,6 +330,7 @@ eventsRouter.get("/", weakJwtVerification, async (_: Request, res: Response) =>
* "isStaff": false,
* "isPrivate": false,
* "displayOnStaffCheckIn": false,
* "mapImageURL": "someurlmapthingy.com",
* "points": 100
* }
*
Expand All @@ -344,7 +350,8 @@ eventsRouter.get("/", weakJwtVerification, async (_: Request, res: Response) =>
* ],
* "eventType": "MEETING",
* "isStaff": true,
* "isAsync": true
* "isAsync": true,
* "mapImageURL": "someurlmapthingy.com",
* }
*
* @apiSuccess (201: Created) {Json} event The created event details.
Expand All @@ -368,6 +375,7 @@ eventsRouter.get("/", weakJwtVerification, async (_: Request, res: Response) =>
* "sponsor": "Event Sponsor",
* "eventType": "WORKSHOP",
* "isStaff": false
* "mapImageURL": "someurlmapthingy.com",
* }
* }
*
Expand All @@ -390,7 +398,8 @@ eventsRouter.get("/", weakJwtVerification, async (_: Request, res: Response) =>
* ],
* "sponsor": "Event Sponsor",
* "eventType": "MEETING",
* "isStaff": true
* "isStaff": true,
* "mapImageURL": "someurlmapthingy.com",
* }
* }
*
Expand Down

0 comments on commit 16ed62f

Please sign in to comment.