diff options
author | mat-1 <github@matdoes.dev> | 2021-05-03 01:38:56 +0000 |
---|---|---|
committer | mat-1 <github@matdoes.dev> | 2021-05-03 01:38:56 +0000 |
commit | 0a1fc6998a7f0c0cdb7c48ce5ad024ac30490de2 (patch) | |
tree | f06f88744f91b016efaa31e4c33860036657ed9b /build/index.js | |
parent | fbd9446806ad3535435729179276ecca4df319d5 (diff) | |
download | skyblock-api-0a1fc6998a7f0c0cdb7c48ce5ad024ac30490de2.tar.gz skyblock-api-0a1fc6998a7f0c0cdb7c48ce5ad024ac30490de2.tar.bz2 skyblock-api-0a1fc6998a7f0c0cdb7c48ce5ad024ac30490de2.zip |
Compiled TS into JS
Diffstat (limited to 'build/index.js')
-rw-r--r-- | build/index.js | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/build/index.js b/build/index.js index f499c21..c7f1385 100644 --- a/build/index.js +++ b/build/index.js @@ -1,4 +1,23 @@ "use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; @@ -7,6 +26,7 @@ exports.debug = void 0; const database_1 = require("./database"); const hypixel_1 = require("./hypixel"); const express_rate_limit_1 = __importDefault(require("express-rate-limit")); +const constants = __importStar(require("./constants")); const express_1 = __importDefault(require("express")); const app = express_1.default(); exports.debug = false; @@ -51,6 +71,9 @@ app.get('/leaderboard/:name', async (req, res) => { app.get('/leaderboards', async (req, res) => { res.json(await database_1.fetchAllLeaderboardsCategorized()); }); +app.get('/constants', async (req, res) => { + res.json(await constants.fetchConstantValues()); +}); // only run the server if it's not doing tests if (!globalThis.isTest) app.listen(8080, () => console.log('App started :)')); |