mirror of
https://github.com/Auties00/Reboot-Launcher.git
synced 2026-01-13 11:12:23 +01:00
27 lines
718 B
JavaScript
Vendored
27 lines
718 B
JavaScript
Vendored
const Express = require("express");
|
|
const express = Express.Router();
|
|
|
|
express.get("/affiliate/api/public/affiliates/slug/:slug", async (req, res) => {
|
|
const SupportedCodes = require("./../responses/SAC.json");
|
|
var ValidCode = false;
|
|
|
|
SupportedCodes.forEach(code => {
|
|
if (req.params.slug.toLowerCase() == code.toLowerCase()) {
|
|
ValidCode = true;
|
|
return res.json({
|
|
"id": code,
|
|
"slug": code,
|
|
"displayName": code,
|
|
"status": "ACTIVE",
|
|
"verified": false
|
|
});
|
|
}
|
|
})
|
|
|
|
if (ValidCode == false) {
|
|
res.status(404);
|
|
res.json({});
|
|
}
|
|
})
|
|
|
|
module.exports = express; |