Update comment
This commit is contained in:
parent
dfb7ef96a7
commit
b3317e3a58
@ -7,7 +7,8 @@ import {
|
|||||||
} from "../../../utils/helpers/passwordHelpers";
|
} from "../../../utils/helpers/passwordHelpers";
|
||||||
import { createUser, getUser } from "../../../utils/helpers/userHelpers";
|
import { createUser, getUser } from "../../../utils/helpers/userHelpers";
|
||||||
|
|
||||||
// Create admin account if one doesn't exist yet
|
// Create admin account if one doesn't exist yet (this is temporary)
|
||||||
|
// There will be a CLI eventually
|
||||||
const pass = generateRandomPassword();
|
const pass = generateRandomPassword();
|
||||||
createUser("admin", pass).then((returned) => {
|
createUser("admin", pass).then((returned) => {
|
||||||
if (returned === true) {
|
if (returned === true) {
|
||||||
@ -42,6 +43,7 @@ export const authOptions = {
|
|||||||
}
|
}
|
||||||
user.lastLoginDate = new Date();
|
user.lastLoginDate = new Date();
|
||||||
await user.save();
|
await user.save();
|
||||||
|
console.log(`User: ${user}`);
|
||||||
return user;
|
return user;
|
||||||
} else {
|
} else {
|
||||||
return null;
|
return null;
|
||||||
|
Reference in New Issue
Block a user