Skip to content

Commit

Permalink
Stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
Alder Whiteford authored and Alder Whiteford committed Jun 20, 2024
1 parent 1f12498 commit 943af33
Show file tree
Hide file tree
Showing 9 changed files with 6 additions and 12 deletions.
1 change: 0 additions & 1 deletion backend/entities/events/previews/models.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
3 changes: 1 addition & 2 deletions backend/entities/events/rsvps/routes.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package rsvps

import (
"github.com/GenerateNU/sac/backend/permission"
"github.com/GenerateNU/sac/backend/types"
"github.com/gofiber/fiber/v2"
)
Expand All @@ -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)
})
}
2 changes: 0 additions & 2 deletions backend/entities/models/event.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
Expand Down
1 change: 0 additions & 1 deletion backend/migrations/000001_init.up.sql
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion frontend/mobile/src/app/app/club/[id].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ const ClubPage = () => {
) : (
<>
<AnimatedImageHeader
uri="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSLF3ord7lnV_5Je-pC2AUgUiesHNPcZlpI7A&s"
uri="https://i.imgur.com/TM29405.png"
scrollOffset={scrollOffset}
imageHeight={IMG_HEIGHT}
aspectRatio={2.5}
Expand Down
2 changes: 1 addition & 1 deletion frontend/mobile/src/app/app/event/[id].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ const EventPage = () => {
) : (
<>
<AnimatedImageHeader
uri={event.image as string}
uri={'https://i.imgur.com/TM29405.png'}
imageHeight={IMG_HEIGHT}
scrollOffset={scrollOffset}
aspectRatio={1}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ export default function DayTimeSection({ time, data }: DayTimeSectionProps) {
eventId={event.id}
startTime={event.startTime}
endTime={event.endTime}
image={event.image}
image={'https://i.imgur.com/TM29405.png'}
/>
</Box>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 ??
Expand Down
3 changes: 1 addition & 2 deletions mock_data/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'],
Expand Down

0 comments on commit 943af33

Please sign in to comment.