Updated the GET download route

This commit is contained in:
Mathias Wagner 2022-08-23 01:47:06 +02:00
parent 82e7d58984
commit 9af2fb2cff
Signed by: Mathias
GPG Key ID: B8DC354B0A1F5B44

View File

@ -12,7 +12,7 @@ const app = express();
let dl_folder; let dl_folder;
// Register routes // Register routes
app.get('/:author/:addon/:version.addon', async (req, res) => { app.get('/:author/:addon/:version.(addon|zip|jar)', async (req, res) => {
// Get author // Get author
const author = await getUserByName(req.params.author); const author = await getUserByName(req.params.author);
if (author === null) return res.status(404).json({code: 1, message: "The provided addon does not exist"}); if (author === null) return res.status(404).json({code: 1, message: "The provided addon does not exist"});