-
Notifications
You must be signed in to change notification settings - Fork 2
TECH-123: Create sql query to fetch event, user, and application information #46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Changes from all commits
Commits
Show all changes
52 commits
Select commit
Hold shift + click to select a range
c05ffe5
fix: makefile points to correct env file
h1divp a30d7ba
docs: added discord dev portal redirect uri instruction
h1divp 0a42fd1
fix: env variable name change
h1divp bfadb56
feat: added event object queries
h1divp bc1bd4f
removed newline
h1divp 543c619
feat: added generic badge component, event badge component, and icon …
hieunguyent12 1b877f1
fix: removed mounting empty node_modules in docker compose file (#41)
AlexanderWangY 1255281
feat: added openapi-typescript for type gen (#42)
AlexanderWangY 1b87a63
feat: new pr template (#43)
AlexanderWangY ecefe7c
ref: change openapi yaml from swagger.yaml to core-api.yaml (#44)
AlexanderWangY 2896119
release: add versioning and random yaml file?? (#45)
AlexanderWangY 3da8e9b
docs: added more installation procedures
h1divp 8b97397
feat: added swagger ui renderer plugin
h1divp 3c4417c
improvement: improved even queries
h1divp e9928d4
chore: sqlc generation
h1divp 65f050b
improvement: update template jira link
h1divp 2b5ca8f
Add hyphen
h1divp 8070e46
refactor: changed referance to link to other site that renders api docs
h1divp 4375eee
feat: added event card button component (#49)
hieunguyent12 e6bb42b
TECH-125: Create Application Schema (#36)
hugoliu-code 1ae7b04
TECH-107: Add mailing list (#40)
hugoliu-code 1948d29
docs(swagger): updated swagger and regenerated web types for event in…
AlexanderWangY 09383f7
Navlink component and some page scaffolding (#51)
AlexanderWangY 217eb18
[TECH 113] Navbar + Appshell beta (#52)
AlexanderWangY 650bc03
feat: admin and event page setup (#53)
AlexanderWangY 0589e02
Granulate CI/CD and only run on necessary files (#54)
AlexanderWangY 8186492
feat: Dockerfile and workflow for building and pushing to GHCR (#55)
AlexanderWangY f84579a
fix: got rid of extra params
h1divp 2e21697
fix: syntax
h1divp a642d14
feat: application queries
h1divp 4a15083
chore: sqlc generate
h1divp fc665d2
Fix: apps can now run
h1divp 022d57f
docs: db testing
h1divp c1e8648
TECH-107: Add mailing list (#40)
hugoliu-code 664c724
Fix/discord pfp (#56)
AlexanderWangY 99ea7bc
fix: allow go sum for build (#57)
AlexanderWangY 160d775
Stanley/basic bot structure (#59)
AlexanderWangY bdcc90a
feat: added event card (#58)
hieunguyent12 0de37b4
feat: swamphacks infra files (#61)
AlexanderWangY d1f617c
fix: add more build images (#62)
AlexanderWangY cd7d5af
Fix/multi platform build (#63)
AlexanderWangY df35fab
feat: new deployment for prod server (#64)
AlexanderWangY 12b54c7
hotfix: fix script to indented
AlexanderWangY a3a0226
fix goose migraitons hotfix
AlexanderWangY 75a7700
feat: dev deployment (#65)
AlexanderWangY cad1a11
Feat/dev deployment api (#66)
AlexanderWangY b838276
hotfix: dev api
AlexanderWangY 78e3772
Merge and fastforward timeline (#68)
AlexanderWangY 1b16a94
Merge branch 'master' into TECH-123
h1divp ae3b57c
Refactor: made UpdateEvent sql easier to use, renamed query. Fix: rem…
h1divp 7b7ef87
feat: added saved_at param and added to UpdateEventById
h1divp 26f3975
chore: make generate
h1divp File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| -- name: CreateApplication :one | ||
| INSERT INTO applications ( | ||
| user_id, event_id | ||
| ) VALUES ( | ||
| $1, $2 | ||
| ) | ||
| RETURNING *; | ||
|
|
||
| -- name: GetApplicationByUserAndEventID :one | ||
| SELECT * FROM applications | ||
| WHERE user_id = $1 AND event_id = $2; | ||
|
|
||
| -- name: UpdateApplication :exec | ||
| UPDATE applications | ||
| SET | ||
| status = CASE WHEN @status_do_update::boolean THEN @status::application_status ELSE status END, | ||
| application = CASE WHEN @application_do_update::boolean THEN @application::JSONB ELSE application END, | ||
| resume_url = CASE WHEN @resume_url_do_update::boolean THEN @resume_url ELSE resume_url END | ||
|
h1divp marked this conversation as resolved.
|
||
| WHERE | ||
| user_id = @user_id AND event_id = @event_id; | ||
|
|
||
| -- name: DeleteApplication :exec | ||
| DELETE FROM applications | ||
| WHERE user_id = $1 AND event_id = $2; | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| -- name: CreateEvent :one | ||
| INSERT INTO events ( | ||
| name, | ||
| application_open, application_close, | ||
| start_time, end_time | ||
| ) VALUES ( | ||
| $1, | ||
| $2, $3, | ||
| $4, $5 | ||
| ) | ||
| RETURNING *; | ||
|
|
||
| -- name: GetEventByID :one | ||
| SELECT * FROM events | ||
| WHERE id = $1; | ||
|
|
||
| -- name: UpdateEventById :exec | ||
| UPDATE events | ||
| SET | ||
| name = coalesce(sqlc.narg('name'), name), | ||
| description = coalesce(sqlc.narg('description'), description), | ||
| location = coalesce(sqlc.narg('location'), location), | ||
| location_url = coalesce(sqlc.narg('location_url'), location_url), | ||
| max_attendees = coalesce(sqlc.narg('max_attendees'), max_attendees), | ||
| application_open = coalesce(sqlc.narg('application_open'), application_open), | ||
| application_close = coalesce(sqlc.narg('application_close'), application_close), | ||
| rsvp_deadline = coalesce(sqlc.narg('rsvp_deadline'), rsvp_deadline), | ||
| decision_release = coalesce(sqlc.narg('decision_release'), decision_release), | ||
| start_time = coalesce(sqlc.narg('start_time'), start_time), | ||
| end_time = coalesce(sqlc.narg('end_time'), end_time), | ||
| website_url = coalesce(sqlc.narg('website_url'), website_url), | ||
| is_published = coalesce(sqlc.narg('is_published'), is_published), | ||
| saved_at = coalesce(sqlc.narg('saved_at'), is_published) | ||
| WHERE | ||
| id = @id::uuid; | ||
|
|
||
| -- name: DeleteEvent :exec | ||
| DELETE FROM events | ||
| WHERE id = $1; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.