From bde5aea211e9838b4511a2b57c6a256fe89b66ab Mon Sep 17 00:00:00 2001 From: Owen Jacobson Date: Thu, 17 Oct 2024 02:19:23 -0400 Subject: Get loaded data using `export let data`, instead of fishing around in $page. This is mostly a how-to-Svelte thing. I've also made the API responses for invites a bit more caller-friendly by flattening them and adding the ID field into them. The ID is redundant (the client knows it because the client has the invitation URL), but it makes presenting invitations and actioning them a bit easier. --- ...c19a4eed48252247f15a046098d63359c6d9047c9a.json | 38 ++++++++++++++++++++++ ...aab9d1be6f740ec4a7fc713056befc4ac700259951.json | 32 ------------------ 2 files changed, 38 insertions(+), 32 deletions(-) create mode 100644 .sqlx/query-d9c772a28d1b5b2ca3b0a2c19a4eed48252247f15a046098d63359c6d9047c9a.json delete mode 100644 .sqlx/query-df22d29fc47244ee696b3eaab9d1be6f740ec4a7fc713056befc4ac700259951.json (limited to '.sqlx') diff --git a/.sqlx/query-d9c772a28d1b5b2ca3b0a2c19a4eed48252247f15a046098d63359c6d9047c9a.json b/.sqlx/query-d9c772a28d1b5b2ca3b0a2c19a4eed48252247f15a046098d63359c6d9047c9a.json new file mode 100644 index 0000000..39e9231 --- /dev/null +++ b/.sqlx/query-d9c772a28d1b5b2ca3b0a2c19a4eed48252247f15a046098d63359c6d9047c9a.json @@ -0,0 +1,38 @@ +{ + "db_name": "SQLite", + "query": "\n\t\t\t\tselect\n invite.id as \"invite_id: Id\",\n\t\t\t\t\tissuer.id as \"issuer_id: login::Id\",\n\t\t\t\t\tissuer.name as \"issuer_name\",\n\t\t\t\t\tinvite.issued_at as \"invite_issued_at: DateTime\"\n\t\t\t\tfrom invite\n\t\t\t\tjoin login as issuer on (invite.issuer = issuer.id)\n\t\t\t\twhere invite.id = $1\n\t\t\t", + "describe": { + "columns": [ + { + "name": "invite_id: Id", + "ordinal": 0, + "type_info": "Text" + }, + { + "name": "issuer_id: login::Id", + "ordinal": 1, + "type_info": "Text" + }, + { + "name": "issuer_name", + "ordinal": 2, + "type_info": "Text" + }, + { + "name": "invite_issued_at: DateTime", + "ordinal": 3, + "type_info": "Text" + } + ], + "parameters": { + "Right": 1 + }, + "nullable": [ + false, + false, + false, + false + ] + }, + "hash": "d9c772a28d1b5b2ca3b0a2c19a4eed48252247f15a046098d63359c6d9047c9a" +} diff --git a/.sqlx/query-df22d29fc47244ee696b3eaab9d1be6f740ec4a7fc713056befc4ac700259951.json b/.sqlx/query-df22d29fc47244ee696b3eaab9d1be6f740ec4a7fc713056befc4ac700259951.json deleted file mode 100644 index 5a34da8..0000000 --- a/.sqlx/query-df22d29fc47244ee696b3eaab9d1be6f740ec4a7fc713056befc4ac700259951.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "db_name": "SQLite", - "query": "\n\t\t\t\tselect\n\t\t\t\t\tissuer.id as \"issuer_id: login::Id\",\n\t\t\t\t\tissuer.name as \"issuer_name\",\n\t\t\t\t\tinvite.issued_at as \"invite_issued_at: DateTime\"\n\t\t\t\tfrom invite\n\t\t\t\tjoin login as issuer on (invite.issuer = issuer.id)\n\t\t\t\twhere invite.id = $1\n\t\t\t", - "describe": { - "columns": [ - { - "name": "issuer_id: login::Id", - "ordinal": 0, - "type_info": "Text" - }, - { - "name": "issuer_name", - "ordinal": 1, - "type_info": "Text" - }, - { - "name": "invite_issued_at: DateTime", - "ordinal": 2, - "type_info": "Text" - } - ], - "parameters": { - "Right": 1 - }, - "nullable": [ - false, - false, - false - ] - }, - "hash": "df22d29fc47244ee696b3eaab9d1be6f740ec4a7fc713056befc4ac700259951" -} -- cgit v1.2.3