diff options
| author | Adam Soltys <[email protected]> | 2025-02-21 15:20:53 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2025-02-21 15:20:53 -0800 |
| commit | fc394c6299ff200f4e4f5a95fe34f4e97988632e (patch) | |
| tree | 79a14930e2a17e39debedbb611a23fae8afca12e /routes | |
| parent | 74eb7bab63581d948840dcdc99bb8e465861f072 (diff) | |
| download | coinos-server-fc394c6299ff200f4e4f5a95fe34f4e97988632e.tar.gz coinos-server-fc394c6299ff200f4e4f5a95fe34f4e97988632e.zip | |
add created to existing apps if missing
Diffstat (limited to 'routes')
| -rw-r--r-- | routes/users.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/routes/users.ts b/routes/users.ts index 52b9eef7..106cfd4a 100644 --- a/routes/users.ts +++ b/routes/users.ts @@ -863,8 +863,6 @@ export default { if (app && uid !== app.uid) fail("Unauthorized"); if (secret) pubkey = getPublicKey(secret); - if (!app) app = { created: Date.now() }; - app = { ...app, pubkey, @@ -875,6 +873,8 @@ export default { secret, }; + if (!app?.created) app.created = Date.now(); + await s(`app:${pubkey}`, app); await db.sAdd(`${uid}:apps`, pubkey); |
