diff options
| -rw-r--r-- | internal/server/api/api.go | 2 | ||||
| -rw-r--r-- | 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 ); |
