first commit probably lots of errors
This commit is contained in:
commit
ec94c2080b
99 changed files with 10227 additions and 0 deletions
14
src/express/get/api/api.js
Normal file
14
src/express/get/api/api.js
Normal file
|
@ -0,0 +1,14 @@
|
|||
const { version, repository: { url } } = require('../../../../package.json');
|
||||
const { domain, prefix, mainServer: { invite } } = require('../../../conf/conf.json');
|
||||
module.exports = {
|
||||
name: '/api',
|
||||
dynamic: false,
|
||||
async exe(client, req, res) {
|
||||
try {
|
||||
res.status(200).json({ defaultPrefix: prefix, doamin: domain, version: version, mainGuild: invite, github: url.replace('.git', '') });
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
res.status(500).json({ error: "500 - some error", message: "report it if it happens again" });
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue