usernames now work on the frontend and display the correct username
Some checks failed
Release / release (ubuntu-22.04) (push) Has been cancelled
Release / release (windows-latest) (push) Has been cancelled

This commit is contained in:
2026-04-17 04:59:19 -04:00
parent c3c31dea47
commit 57d9841cfb
2 changed files with 17 additions and 15 deletions

View File

@@ -20,11 +20,11 @@ DEFINE TABLE user SCHEMAFULL
FOR update WHERE id = $auth
FOR create NONE
FOR delete NONE;
DEFINE FIELD username ON user TYPE string;
DEFINE FIELD email ON user TYPE string;
DEFINE FIELD password ON user TYPE string;
DEFINE FIELD avatar ON user TYPE option<string>;
DEFINE FIELD created ON user TYPE datetime DEFAULT time::now();
DEFINE FIELD username ON user TYPE string;
DEFINE FIELD email ON user TYPE string;
DEFINE FIELD password ON user TYPE string;
DEFINE FIELD avatar ON user TYPE option<string>;
DEFINE FIELD created ON user TYPE datetime DEFAULT time::now();
DEFINE INDEX email_idx ON user FIELDS email UNIQUE;
DEFINE TABLE room SCHEMAFULL
@@ -40,10 +40,11 @@ DEFINE TABLE message SCHEMAFULL
FOR create WHERE author = $auth
FOR update WHERE author = $auth
FOR delete WHERE author = $auth;
DEFINE FIELD room ON message TYPE record<room>;
DEFINE FIELD author ON message TYPE record<user>;
DEFINE FIELD body ON message TYPE string;
DEFINE FIELD created ON message TYPE datetime DEFAULT time::now();
DEFINE FIELD room ON message TYPE record<room>;
DEFINE FIELD author ON message TYPE record<user>;
DEFINE FIELD author_username ON message TYPE option<string>;
DEFINE FIELD body ON message TYPE string;
DEFINE FIELD created ON message TYPE datetime DEFAULT time::now();
DEFINE TABLE contact SCHEMAFULL
PERMISSIONS