From 44a85ff442726696ca0f157f151a280f2fa5138f Mon Sep 17 00:00:00 2001 From: Dustin Tauer Date: Thu, 27 Oct 2022 13:42:00 -0500 Subject: [PATCH] Fixes #277 Sequelize version was bumped along the way and now findByID is deprecated. The findByPk method works. --- server/routes/transfers.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/routes/transfers.js b/server/routes/transfers.js index 9019304f..2ea34e9c 100644 --- a/server/routes/transfers.js +++ b/server/routes/transfers.js @@ -63,7 +63,7 @@ router.all('/perform', function(req, res) { Promise.all( [accountFrom, accountTo] - .map(accountId => Account.findById(accountId)) + .map(accountId => Account.findByPk(accountId)) ).then(([aFrom, aTo]) => { if (!aFrom || !aTo) { errorAndReload(req, res, 'One or more account IDs are invalid');