Skip to content

Commit 31ad08a

Browse files
committed
update controller function
1 parent 8158773 commit 31ad08a

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

controllers/users.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -569,7 +569,7 @@ const filterUsers = async (req, res) => {
569569
};
570570

571571
// one time script function to perform the migration - adding github_user_id field to the document
572-
const migrate = async (req, res) => {
572+
const addGithubId = async (req, res) => {
573573
const usersNotFound = [];
574574
let countUserFound = 0;
575575
let countUserNotFound = 0;
@@ -711,7 +711,7 @@ module.exports = {
711711
addDefaultArchivedRole,
712712
getUserSkills,
713713
filterUsers,
714-
migrate,
714+
addGithubId,
715715
verifyUserImage,
716716
getUserImageForVerification,
717717
nonVerifiedDiscordUsers,

routes/users.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,6 @@ router.patch("/:userId", authenticate, authorizeRoles([SUPERUSER]), users.update
5151
router.get("/suggestedUsers/:skillId", authenticate, authorizeRoles([SUPERUSER]), users.getSuggestedUsers);
5252

5353
// WARNING!! - One time Script/Route to do migration.
54-
router.post("/migrate", authenticate, authorizeRoles([SUPERUSER]), users.migrate);
54+
router.post("/migrate", authenticate, authorizeRoles([SUPERUSER]), users.addGithubId);
5555

5656
module.exports = router;

0 commit comments

Comments
 (0)