This commit is contained in:
Cay 2026-03-15 10:47:05 +00:00
parent ef94c8823b
commit 9d65de821e
3 changed files with 18 additions and 3 deletions

View File

@ -588,8 +588,9 @@ body {
font-family: "Cinzel", serif; font-family: "Cinzel", serif;
font-size: 15px; font-size: 15px;
color: #2b1b0f; color: #2b1b0f;
line-height: 1.6; line-height: 1.8;
text-align: center; text-align: center;
white-space: pre-line;
} }
.notification-footer { .notification-footer {

View File

@ -147,7 +147,15 @@ document.addEventListener("click", async (e) => {
const data = await res.json(); const data = await res.json();
if (data.error) { if (data.error) {
showNotification(data.error, "Nicht genug Gold", "🪙"); if (data.missing) {
showNotification(
`Du hast ${data.gold} 🪙 Gold.\nDu brauchst ${data.price} 🪙 Gold.\nEs fehlen dir noch ${data.missing} 🪙 Gold.`,
"Nicht genug Gold",
"🪙",
);
} else {
showNotification(data.error, "Hinweis", "⚠️");
}
return; return;
} }

View File

@ -82,7 +82,13 @@ WHERE account_id = ?
); );
if (currency.gold < price) { if (currency.gold < price) {
return res.json({ error: "Nicht genug Gold" }); const missing = price - currency.gold;
return res.json({
error: "Nicht genug Gold",
gold: currency.gold,
price: price,
missing: missing,
});
} }
await db.query( await db.query(