configGET.js 558 B

12345678910111213141516171819202122
  1. const Route = require('../structures/Route');
  2. const config = require('../../../config');
  3. class configGET extends Route {
  4. constructor() {
  5. super('/config', 'get', { bypassAuth: true });
  6. }
  7. run(req, res) {
  8. return res.json({
  9. version: process.env.npm_package_version,
  10. URL: config.filesServeLocatio,
  11. baseURL: config.backendLocation,
  12. serviceName: config.serviceName,
  13. maxFileSize: config.uploads.uploadMaxSize,
  14. chunkSize: config.uploads.chunkSize,
  15. maxLinksPerAlbum: config.albums.maxLinksPerAlbum
  16. });
  17. }
  18. }
  19. module.exports = configGET;