feat: remove mailV1Alert && fix mobile showSideMargin (#236)

This commit is contained in:
Dream Hunter
2024-05-14 14:44:47 +08:00
committed by GitHub
parent a5b5335137
commit 6bb6fa8298
6 changed files with 9 additions and 23 deletions
+1 -6
View File
@@ -72,16 +72,11 @@ api.get('/api/settings', async (c) => {
} catch (e) {
console.warn("Failed to update address")
}
const { count: mailCountV1 } = await c.env.DB.prepare(
`SELECT count(*) as count FROM mails where address = ?`
).bind(address).first();
const balance = await c.env.DB.prepare(
`SELECT balance FROM address_sender
where address = ? and enabled = 1`
`SELECT balance FROM address_sender where address = ? and enabled = 1`
).bind(address).first("balance");
return c.json({
address: address,
has_v1_mails: mailCountV1 && mailCountV1 > 0,
send_balance: balance || 0,
});
})