From 67ee81e912ab26930b3152ab3f35712cc68573e7 Mon Sep 17 00:00:00 2001 From: gumi Date: Fri, 6 Mar 2020 14:25:05 -0500 Subject: expose the vault account id --- src/routers/vault/middlewares/account.js | 2 ++ src/routers/vault/middlewares/legacy/account.js | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/src/routers/vault/middlewares/account.js b/src/routers/vault/middlewares/account.js index 03c5ce0..9360728 100644 --- a/src/routers/vault/middlewares/account.js +++ b/src/routers/vault/middlewares/account.js @@ -41,8 +41,10 @@ const get_data = async (req, res, next) => { res.status(200).json({ status: "success", data: { + // TODO: make this a method of Session primaryIdentity: session.primaryIdentity, allowNonPrimary: session.allowNonPrimary, + vaultId: session.vault, }, }); req.app.locals.cooldown(req, 1e3); diff --git a/src/routers/vault/middlewares/legacy/account.js b/src/routers/vault/middlewares/legacy/account.js index b78317f..fb507de 100644 --- a/src/routers/vault/middlewares/legacy/account.js +++ b/src/routers/vault/middlewares/legacy/account.js @@ -321,6 +321,8 @@ const migrate = async (req, res, next) => { vaultId: session.vault, }); + // TODO: set an account variable with the original legacy account id + const evol_account = new EvolAccount(evol_acc.accountId, evol_acc.userid); evol_account.legacyId = legacy.accountId; evol_account.legacyAccount = legacy; @@ -358,6 +360,8 @@ const migrate = async (req, res, next) => { continue; } + // TODO: set a variable in the char with the original legacy char id + // remove the name reservation req.app.locals.evol.char_reservation.destroy({ where: { name: char.name } -- cgit v1.2.3-60-g2f50