diff options
author | gumi <git@gumi.ca> | 2020-03-06 14:25:05 -0500 |
---|---|---|
committer | gumi <git@gumi.ca> | 2020-03-06 14:25:05 -0500 |
commit | 67ee81e912ab26930b3152ab3f35712cc68573e7 (patch) | |
tree | c227fbfc9b2686f85f4c977e562eb07f733e6fcd | |
parent | 94c85d99e47addc69a8dd35d685d19ffb8afebf3 (diff) | |
download | apiv1-67ee81e912ab26930b3152ab3f35712cc68573e7.tar.gz apiv1-67ee81e912ab26930b3152ab3f35712cc68573e7.tar.bz2 apiv1-67ee81e912ab26930b3152ab3f35712cc68573e7.tar.xz apiv1-67ee81e912ab26930b3152ab3f35712cc68573e7.zip |
expose the vault account id
-rw-r--r-- | src/routers/vault/middlewares/account.js | 2 | ||||
-rw-r--r-- | src/routers/vault/middlewares/legacy/account.js | 4 |
2 files changed, 6 insertions, 0 deletions
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 } |