From 6a5131792f45b4494c9db727b1344becb742a488 Mon Sep 17 00:00:00 2001 From: Kyren223 Date: Wed, 27 Nov 2024 17:39:52 +0200 Subject: Fixed minor issues on the server --- internal/server/api/api.go | 2 +- migrations/20241026174345_init.sql | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/server/api/api.go b/internal/server/api/api.go index f320838..7dcf1ab 100644 --- a/internal/server/api/api.go +++ b/internal/server/api/api.go @@ -83,7 +83,7 @@ func CreateOrGetUser(ctx context.Context, node *snowflake.Node, pubKey ed25519.P return user, nil } -func CreateNetwork(ctx context.Context, sess *session.Session, request packet.CreateNetwork) packet.Payload { +func CreateNetwork(ctx context.Context, sess *session.Session, request *packet.CreateNetwork) packet.Payload { name := strings.TrimSpace(request.Name) if name == "" { return &packet.Error{Error: "server name must not be blank"} diff --git a/migrations/20241026174345_init.sql b/migrations/20241026174345_init.sql index f7cedd8..02fdee8 100644 --- a/migrations/20241026174345_init.sql +++ b/migrations/20241026174345_init.sql @@ -18,7 +18,7 @@ CREATE TABLE users ( id INTEGER PRIMARY KEY, name TEXT NOT NULL, public_key BLOB NOT NULL UNIQUE, - description TEXT NOT NULL, + description TEXT NOT NULL DEFAULT '', is_public_dm BOOLEAN NOT NULL CHECK (is_public_dm IN (false, true)) DEFAULT true, is_deleted BOOLEAN NOT NULL CHECK (is_deleted IN (false, true)) DEFAULT false ); -- cgit v1.3.1