Refactor uptimeObject to use a Map instead of an object

Signed-off-by: Scott Gould <greysilly7@gmail.com>
This commit is contained in:
Scott Gould 2024-09-25 16:11:09 -04:00
parent be40162fc5
commit cd7135518a
No known key found for this signature in database
6 changed files with 74 additions and 77 deletions

View file

@ -71,7 +71,7 @@ app.use("/services/oembed", (req: Request, res: Response)=>{
});
app.use("/uptime", (req: Request, res: Response)=>{
const instanceUptime = uptime[req.query.name as string];
const instanceUptime = uptime.get(req.query.name as string);
res.send(instanceUptime);
});