refactor(server): use insert instead of save
This commit is contained in:
parent
4a64280a7c
commit
6be1db00d1
9 changed files with 19 additions and 18 deletions
|
|
@ -57,12 +57,12 @@ export default define(meta, async (ps) => {
|
|||
const token = uuid();
|
||||
|
||||
// Create session token document
|
||||
const doc = await AuthSessions.save({
|
||||
const doc = await AuthSessions.insert({
|
||||
id: genId(),
|
||||
createdAt: new Date(),
|
||||
appId: app.id,
|
||||
token: token,
|
||||
});
|
||||
}).then(x => AuthSessions.findOneOrFail(x.identifiers[0]));
|
||||
|
||||
return {
|
||||
token: doc.token,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue