Add endpoint with version of the API

This commit is contained in:
Pitu 2020-07-18 04:31:12 +09:00
parent ec51cc803e
commit 8ffa0ba075
1 changed files with 15 additions and 0 deletions

View File

@ -0,0 +1,15 @@
const Route = require('../../structures/Route');
class versionGET extends Route {
constructor() {
super('/version', 'get', { bypassAuth: true });
}
run(req, res) {
return res.json({
version: process.env.npm_package_version
});
}
}
module.exports = versionGET;