From 49b18413c6c99c95d63d0450086ffd7dea4dc977 Mon Sep 17 00:00:00 2001 From: Mathias Wagner Date: Tue, 23 Aug 2022 01:47:38 +0200 Subject: [PATCH] Fixed the addon route --- routes/addon.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/routes/addon.js b/routes/addon.js index bf7dc3f..7144d5d 100644 --- a/routes/addon.js +++ b/routes/addon.js @@ -55,7 +55,7 @@ app.put("/", isAuthenticatedUser, async (req, res) => { try { res.status(201).json({ message: "Successfully created the addon", - id: (await createAddon({...req.body, user_id: req.user._id}))._id + id: (await createAddon({...req.body, author: req.user._id}))._id }); } catch (e) { res.status(500).json({message: "An internal error occurred"});