update
This commit is contained in:
@@ -14,4 +14,4 @@ import './config/index.ts';
|
||||
|
||||
// import './mark/index.ts';
|
||||
|
||||
import './file-listener/index.ts';
|
||||
import './file-listener/index.ts';
|
||||
@@ -55,7 +55,7 @@ app
|
||||
})
|
||||
.define(async (ctx) => {
|
||||
const tokenUser = ctx.state.tokenUser;
|
||||
const { id, updatedAt: _clear, title = 'life', createdAt: _clear2, token, ...rest } = ctx.query.data;
|
||||
const { id, updatedAt: _clear, title = 'life', createdAt: _clear2, token: _, ...rest } = ctx.query.data;
|
||||
let secret: UserSecret;
|
||||
let isNew = false;
|
||||
|
||||
@@ -75,8 +75,12 @@ app
|
||||
title,
|
||||
},
|
||||
});
|
||||
} else {
|
||||
secret = await UserSecret.createSecret(tokenUser);
|
||||
}
|
||||
if (!secret) {
|
||||
secret = await UserSecret.createSecret({
|
||||
...tokenUser,
|
||||
title,
|
||||
});
|
||||
isNew = true;
|
||||
}
|
||||
if (secret) {
|
||||
|
||||
Reference in New Issue
Block a user