summaryrefslogtreecommitdiff
path: root/src/routers/vault/middlewares/session.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/routers/vault/middlewares/session.js')
-rw-r--r--src/routers/vault/middlewares/session.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/routers/vault/middlewares/session.js b/src/routers/vault/middlewares/session.js
index c9b7e13..454a235 100644
--- a/src/routers/vault/middlewares/session.js
+++ b/src/routers/vault/middlewares/session.js
@@ -33,7 +33,7 @@ const delete_session = async (req, res) => {
req.app.locals.vault.login_log.create({
userId: session.vault,
action: "LOGOUT",
- ip: req.app.locals.sequelize.vault.fn("INET6_ATON", req.ip),
+ ip: req.ip,
});
req.app.locals.session.delete(token);
@@ -129,7 +129,7 @@ const auth_session = async (req, res) => {
req.app.locals.vault.login_log.create({
userId: user.id,
action: "CREATE",
- ip: req.app.locals.sequelize.vault.fn("INET6_ATON", req.ip),
+ ip: req.ip,
});
/** @type {Identity} */
@@ -142,7 +142,7 @@ const auth_session = async (req, res) => {
userId: user.id,
identityId: ident.id,
action: "ADD",
- ip: req.app.locals.sequelize.vault.fn("INET6_ATON", req.ip),
+ ip: req.ip,
});
user.primaryIdentity = ident.id;
@@ -194,7 +194,7 @@ const auth_session = async (req, res) => {
req.app.locals.vault.login_log.create({
userId: session.vault,
action: "LOGIN",
- ip: req.app.locals.sequelize.vault.fn("INET6_ATON", req.ip),
+ ip: req.ip,
});
if (session.identity !== session.primaryIdentity) {