forked from creations/profilePage
fix issue with rain and snow, fix ejs formatting
This commit is contained in:
parent
78c2eb4545
commit
c54d959e7e
2 changed files with 85 additions and 76 deletions
|
@ -37,6 +37,8 @@ async function handler(): Promise<Response> {
|
|||
status = presence.discord_status;
|
||||
}
|
||||
|
||||
console.log(presence.kv.rain);
|
||||
|
||||
const ejsTemplateData: EjsTemplateData = {
|
||||
title: presence.discord_user.global_name || presence.discord_user.username,
|
||||
username:
|
||||
|
@ -51,10 +53,13 @@ async function handler(): Promise<Response> {
|
|||
},
|
||||
instance,
|
||||
readme,
|
||||
allowSnow: presence.kv.snow || false,
|
||||
allowRain: presence.kv.rain || false,
|
||||
allowSnow: presence.kv.snow === "true",
|
||||
allowRain: presence.kv.rain === "true",
|
||||
};
|
||||
|
||||
console.log("allowSnow", presence.kv.snow);
|
||||
console.log("allowRain", presence.kv.rain);
|
||||
|
||||
return await renderEjsTemplate("index", ejsTemplateData);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue