This commit is contained in:
Alessandro Autiero
2024-06-15 17:57:17 +02:00
parent 2bf084d120
commit e24f4e97b3
144 changed files with 442 additions and 278 deletions

View File

@@ -0,0 +1,27 @@
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;