Fixed the addon route

This commit is contained in:
Mathias Wagner 2022-08-23 01:47:38 +02:00
parent b6e0bbc458
commit 49b18413c6
Signed by: Mathias
GPG Key ID: B8DC354B0A1F5B44

View File

@ -55,7 +55,7 @@ app.put("/", isAuthenticatedUser, async (req, res) => {
try { try {
res.status(201).json({ res.status(201).json({
message: "Successfully created the addon", 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) { } catch (e) {
res.status(500).json({message: "An internal error occurred"}); res.status(500).json({message: "An internal error occurred"});