diff options
| author | Adam Soltys <[email protected]> | 2025-02-19 14:13:18 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2025-02-19 14:13:18 -0800 |
| commit | 65b85fbd74fa7587b3af3d5ae4535dd07ba4efd7 (patch) | |
| tree | df9ff4561ecf16d47ac421d8b0342b87e3dc3513 /routes | |
| parent | 3a4cc3a7b3eede4c5ee08f90243ffc3ca915e050 (diff) | |
| download | coinos-server-65b85fbd74fa7587b3af3d5ae4535dd07ba4efd7.tar.gz coinos-server-65b85fbd74fa7587b3af3d5ae4535dd07ba4efd7.zip | |
only set created for new connections
Diffstat (limited to 'routes')
| -rw-r--r-- | routes/users.ts | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/routes/users.ts b/routes/users.ts index 604bdbf5..577d1f5a 100644 --- a/routes/users.ts +++ b/routes/users.ts @@ -866,6 +866,8 @@ export default { if (app && uid !== app.uid) fail("Unauthorized"); if (secret) pubkey = getPublicKey(secret); + if (!app) app = { created: Date.now }; + app = { ...app, pubkey, @@ -874,7 +876,6 @@ export default { name, uid, secret, - created: Date.now(), }; await s(`app:${pubkey}`, app); |
