summaryrefslogtreecommitdiff
path: root/internal/data
diff options
context:
space:
mode:
authorKyren223 <Kyren223@proton.me>2024-11-26 12:11:02 +0200
committerKyren223 <Kyren223@proton.me>2024-11-26 12:11:02 +0200
commit195a2912b7c67393b806dedb058590d8bc201186 (patch)
treec7d40cfc2cca3974622d4fdd8173fc37ff3a9f15 /internal/data
parent49ea3d630ba72a68cd55d9bdb2d9af30b062c6a4 (diff)
Added is private input to network creation
Diffstat (limited to 'internal/data')
-rw-r--r--internal/data/models.go2
-rw-r--r--internal/data/networks.sql.go7
2 files changed, 5 insertions, 4 deletions
diff --git a/internal/data/models.go b/internal/data/models.go
index fab7489..4bfb7a5 100644
--- a/internal/data/models.go
+++ b/internal/data/models.go
@@ -32,7 +32,7 @@ type Network struct {
OwnerID snowflake.ID
Name string
Icon string
- BgHexColor *string
+ BgHexColor string
FgHexColor string
IsPublic bool
}
diff --git a/internal/data/networks.sql.go b/internal/data/networks.sql.go
index 4b9e390..d690b7b 100644
--- a/internal/data/networks.sql.go
+++ b/internal/data/networks.sql.go
@@ -16,7 +16,8 @@ INSERT INTO networks (
id, owner_id, name, is_public,
icon, bg_hex_color, fg_hex_color
) VALUES (
- ?, ?, ?, ?, ?, ?, ?
+ ?, ?, ?, ?,
+ ?, ?, ?
)
RETURNING id, owner_id, name, icon, bg_hex_color, fg_hex_color, is_public
`
@@ -27,7 +28,7 @@ type CreateNetworkParams struct {
Name string
IsPublic bool
Icon string
- BgHexColor *string
+ BgHexColor string
FgHexColor string
}
@@ -229,7 +230,7 @@ RETURNING id, owner_id, name, icon, bg_hex_color, fg_hex_color, is_public
type SetNetworkIconParams struct {
Icon string
- BgHexColor *string
+ BgHexColor string
FgHexColor string
ID snowflake.ID
}