add dashboard for testing
All checks were successful
CI for GGS-CRON / build-docker (push) Successful in 1m38s
CI for GGS-CRON / build-and-test (push) Successful in 3m22s

This commit is contained in:
Pakin 2025-08-11 17:38:45 +07:00
parent cae03f0e30
commit 8e5421ed17
5 changed files with 100 additions and 8 deletions

View file

@ -28,4 +28,7 @@ endpointMap = {
res.render("heartbeat");
},
'info': function(req, res, next){
res.json(heartbeatApiInfo);
}
};

View file

@ -26,12 +26,19 @@ endpointMap = {
res.render("apiInfo");
},
"run/now": function (req, res, next) {
GoogleFunctions.syncProfilePrice(sheet, "tha", false);
res.send("Force run `Sync Thai Price Slots`");
"info": function(req, res, next) {
res.json(syncThaiProfilePriceSlotApiInfo);
},
"run/test": function (req, res, next) {
GoogleFunctions.syncProfilePrice(sheet, "tha", true);
res.send("Force run `Sync Thai Price Slots` test mode");
"run/now": async function (req, res, next) {
// res.json({ status: "running" });
await GoogleFunctions.syncProfilePrice(sheet, "tha", false);
res.json({ status: "success", message: "Force run `Sync Thai Price Slots`" });
// res.send("Force run `Sync Thai Price Slots`");
},
"run/test": async function (req, res, next) {
// res.json({ status: "running" });
await GoogleFunctions.syncProfilePrice(sheet, "tha", true);
res.json({ status: "success", message: "Force run `Sync Thai Price Slots` test mode" });
// res.send("Force run `Sync Thai Price Slots` test mode");
},
};