mirror of
https://github.com/zadam/trilium.git
synced 2025-11-02 19:36:12 +01:00
smaller refactorings
This commit is contained in:
@@ -20,8 +20,9 @@ async function login(req) {
|
||||
return [401, "Incorrect username/password"];
|
||||
}
|
||||
|
||||
const apiToken = new ApiToken({ token: utils.randomSecureToken() });
|
||||
await apiToken.save();
|
||||
const apiToken = await new ApiToken({
|
||||
token: utils.randomSecureToken()
|
||||
}).save();
|
||||
|
||||
return {
|
||||
token: apiToken.token
|
||||
|
||||
Reference in New Issue
Block a user