All APIs on resources.json
This commit is contained in:
parent
b0d9e55edf
commit
2d02e6213f
11 changed files with 49 additions and 28 deletions
|
@ -1,3 +1,4 @@
|
|||
const Resources = require('../props/resources.json');
|
||||
const axios = require('axios');
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
|
@ -7,7 +8,7 @@ const spamwatchMiddleware = require('../plugins/lib-spamwatch/Middleware.js')(is
|
|||
|
||||
async function downloadModule(moduleId) {
|
||||
try {
|
||||
const downloadUrl = `https://api.modarchive.org/downloads.php?moduleid=${moduleId}`;
|
||||
const downloadUrl = `${Resources.modArchiveApi}${moduleId}`;
|
||||
const response = await axios({
|
||||
url: downloadUrl,
|
||||
method: 'GET',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue