diff --git a/backend/entities/events/previews/models.go b/backend/entities/events/previews/models.go index cb287c92..6f6e9a44 100644 --- a/backend/entities/events/previews/models.go +++ b/backend/entities/events/previews/models.go @@ -15,7 +15,6 @@ type Common struct { Link string `json:"link"` StartTime time.Time `json:"start_time"` EndTime time.Time `json:"end_time"` - Image string `json:"image"` } type EventStub struct { diff --git a/backend/entities/events/rsvps/routes.go b/backend/entities/events/rsvps/routes.go index 4a0d999b..c228f039 100644 --- a/backend/entities/events/rsvps/routes.go +++ b/backend/entities/events/rsvps/routes.go @@ -1,7 +1,6 @@ package rsvps import ( - "github.com/GenerateNU/sac/backend/permission" "github.com/GenerateNU/sac/backend/types" "github.com/gofiber/fiber/v2" ) @@ -13,6 +12,6 @@ func EventsRSVPs(params types.RouteParams) { params.Router.Route("/:eventID/rsvps", func(r fiber.Router) { r.Get("/", params.UtilityMiddleware.Paginator, controller.GetEventRSVPs) r.Post("/:userID", controller.CreateEventRSVP) - r.Delete("/:userID", params.AuthMiddleware.UserAuthorizeById, params.AuthMiddleware.Authorize(permission.DeleteAll), controller.DeleteEventRSVP) + r.Delete("/:userID", params.AuthMiddleware.UserAuthorizeById, controller.DeleteEventRSVP) }) } diff --git a/backend/entities/models/event.go b/backend/entities/models/event.go index 4defdace..edf5395a 100644 --- a/backend/entities/models/event.go +++ b/backend/entities/models/event.go @@ -24,8 +24,6 @@ type Event struct { Description string `json:"description"` Host *uuid.UUID `json:"host"` - Image string `json:"image"` - // geoshi EventType EventType `json:"event_type"` Location string `json:"location"` diff --git a/backend/migrations/000001_init.up.sql b/backend/migrations/000001_init.up.sql index 31e2f0f6..6af707ab 100644 --- a/backend/migrations/000001_init.up.sql +++ b/backend/migrations/000001_init.up.sql @@ -89,7 +89,6 @@ CREATE TABLE IF NOT EXISTS "events"( created_at timestamp WITH time zone NOT NULL DEFAULT CURRENT_TIMESTAMP, updated_at timestamp WITH time zone NOT NULL DEFAULT CURRENT_TIMESTAMP, name varchar(255) NOT NULL, - image varchar(255), preview varchar(255) NOT NULL, description text NOT NULL, event_type event_type NOT NULL, diff --git a/frontend/mobile/src/app/app/club/[id].tsx b/frontend/mobile/src/app/app/club/[id].tsx index dd285840..96c350f1 100644 --- a/frontend/mobile/src/app/app/club/[id].tsx +++ b/frontend/mobile/src/app/app/club/[id].tsx @@ -122,7 +122,7 @@ const ClubPage = () => { ) : ( <> { ) : ( <> ); diff --git a/frontend/mobile/src/app/design-system/components/Calendar/parser/calendarParser.ts b/frontend/mobile/src/app/design-system/components/Calendar/parser/calendarParser.ts index 518707ff..0311e0d2 100644 --- a/frontend/mobile/src/app/design-system/components/Calendar/parser/calendarParser.ts +++ b/frontend/mobile/src/app/design-system/components/Calendar/parser/calendarParser.ts @@ -63,7 +63,7 @@ export function parseData(start: number, end: number, data?: EventPreview[]) { title: event.name, startTime: event.start_time, endTime: event.end_time, - image: event.image as string, + image: 'https://i.imgur.com/TM29405.png', host_name: event.host_name, host_logo: event.host_logo ?? diff --git a/mock_data/main.py b/mock_data/main.py index 9523078a..738581f8 100644 --- a/mock_data/main.py +++ b/mock_data/main.py @@ -366,14 +366,13 @@ def fill_clubs(): @transaction def fill_events(): print("Creating event data...") - cmd = """INSERT INTO "events" ("id", "host", "name", "image", "preview", "description", "event_type", "start_time", "end_time", "is_public", "is_draft", "is_archived") VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)""" + cmd = """INSERT INTO "events" ("id", "host", "name", "preview", "description", "event_type", "start_time", "end_time", "is_public", "is_draft", "is_archived") VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)""" for event in events: data = ( event['id'], event['club_id'], event['name'].replace("\'", "''"), - random.choice(randomEventImageData), event['preview'].replace("\'", "''"), event['description'].replace('\'', "''"), event['event_type'],