mirror of
https://github.com/cassoule/flopobot_v2.git
synced 2026-01-18 16:37:40 +01:00
WIP: case opening
This commit is contained in:
@@ -114,6 +114,22 @@ export function apiRoutes(client, io) {
|
||||
}
|
||||
});
|
||||
|
||||
router.get("/carousel-skins", (req, res) => {
|
||||
try {
|
||||
const filteredSkins = skins.filter(
|
||||
(s) => s.displayIcon !== null && s.displayName.toLowerCase().includes("champions"),
|
||||
);
|
||||
filteredSkins.forEach((s) => {
|
||||
let dbSKin = getSkin.get(s.uuid);
|
||||
s.tierColor = dbSKin?.tierColor;
|
||||
});
|
||||
res.json(filteredSkins);
|
||||
} catch (error) {
|
||||
console.error("Error fetching skins:", error);
|
||||
res.status(500).json({ error: "Failed to fetch skins." });
|
||||
}
|
||||
});
|
||||
|
||||
router.get("/skin/:id", (req, res) => {
|
||||
try {
|
||||
const skinData = skins.find((s) => s.uuid === req.params.id);
|
||||
|
||||
@@ -260,6 +260,7 @@ function handleMarketOffersUpdate() {
|
||||
offers.forEach((offer) => {
|
||||
console.log(`[Market Cron] Checking offer ID: ${offer.id}, Status: ${offer.status}`);
|
||||
console.log(`Now: ${now}, Closing At: ${offer.closing_at}, ${now >= offer.closing_at}`);
|
||||
if (true) return; // Disable market offer closing for now
|
||||
if (now >= offer.closing_at && offer.status !== "closed") {
|
||||
const bids = getOfferBids.all(offer.id);
|
||||
console.log(bids.length);
|
||||
|
||||
Reference in New Issue
Block a user