-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: created DB file * feat: type model for scouting system * chore: update svelte * feat: tried * feat: nothing * feat: add none * feat: added DB.sql and migrations * refactor: type state model * feat: state transforms * add successfail screen * theme fixes * fix: package.json * fix: formating * fix: dependencies * format thingy * feat: implemented submit api * fix: removed unnecessary line * refactor: update types to match new schema * fix: id after clarifying with Brandon * update dep * style: format files * feat: pulled from main * style: format files * fix: dependencies * style: format files * fix: dependencies * fix: skill property name * fix: removed npm config * fix: bun dependencies * feat: finished submit function * feat: read route * feat: superscouting and pit scouting in db * fix: DB code * fix: updated queries to allow ids * fix: tailwind to CommonJS module * style: format files * fix: queries * style: format files * fix: types * style: format files * feat: hooked up frontend to backend * fix: queries * feat: functional queries * style: format files * fix: queries returning too much * more merge * feat: insert to users and matches * style: format files * fix: database enums * fix: missing comma --------- Co-authored-by: Brandon Harad <[email protected]> Co-authored-by: awwpotato <[email protected]> Co-authored-by: awwpotato <[email protected]> Co-authored-by: Brandon-Harad <[email protected]> Co-authored-by: azaleacolburn <[email protected]>
- Loading branch information
1 parent
dd088e6
commit 4b4936a
Showing
5 changed files
with
73 additions
and
22 deletions.
There are no files selected for viewing
This file contains 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 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 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 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,8 @@ | ||
import { json } from '@sveltejs/kit'; | ||
import type { RequestHandler } from './$types'; | ||
import { insertMatch } from '$lib/server-assets/database'; | ||
|
||
export const POST: RequestHandler = async ({ request }) => { | ||
const match_key: string = await request.json(); | ||
return json(await insertMatch(match_key)); | ||
}; |
This file contains 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 |
---|---|---|
@@ -1,9 +1,9 @@ | ||
import type { TeamMatch } from '$lib/types'; | ||
import { json } from '@sveltejs/kit'; | ||
import type { RequestHandler } from './$types'; | ||
import { insertTeamMatch } from '$lib/server-assets/database'; | ||
import { insertTeamMatch, insertUser } from '$lib/server-assets/database'; | ||
|
||
export const POST: RequestHandler = async ({ request }) => { | ||
const match: TeamMatch = await request.json(); | ||
return json(await insertTeamMatch(match)); | ||
return json((await insertTeamMatch(match)) && (await insertUser(match.scout_id))); | ||
}; |