diff options
author | Madeline <46743919+MaddyUnderStars@users.noreply.github.com> | 2022-04-05 19:58:34 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-05 12:58:34 +0300 |
commit | d08689b4180c2a66382ca9a6174b1c177076a65f (patch) | |
tree | 0f42df759790e39e1824b0989d2ac73998c84692 /util/src/entities | |
parent | Revert "Make member.premium_since ISO8601 timestamp" (#710) (diff) | |
download | server-d08689b4180c2a66382ca9a6174b1c177076a65f.tar.xz |
User Notes (#707)
* Notes implementation. Bug: Client does not save note locally after uploading to server. Client does save after reloading page. Is this due to the response being sent by PUT? * I don't know why the client doesn't do optimistic UI updates with this, or any updates at all without reloading the page * Added USER_NOTE_UPDATE event, thanks @TheRealGeoDash2019 !
Diffstat (limited to 'util/src/entities')
-rw-r--r-- | util/src/entities/User.ts | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/util/src/entities/User.ts b/util/src/entities/User.ts index ed7bd4ce..7091ee24 100644 --- a/util/src/entities/User.ts +++ b/util/src/entities/User.ts @@ -164,6 +164,9 @@ export class User extends BaseClass { @Column({ type: "simple-json", select: false }) settings: UserSettings; + @Column({ type: "simple-json" }) + notes: { [key: string]: string }; //key is ID of user + toPublicUser() { const user: any = {}; PublicUserProjection.forEach((x) => { @@ -271,6 +274,7 @@ export class User extends BaseClass { }, settings: { ...defaultSettings, locale: language }, fingerprints: [], + notes: {}, }); await user.save(); |