mirror of
https://github.com/dreamhunter2333/cloudflare_temp_email.git
synced 2026-05-19 23:30:25 +08:00
fix: cannot delete addres when not bind KV (#284)
This commit is contained in:
@@ -102,6 +102,7 @@ export const unbindTelegramAddress = async (
|
||||
export const unbindTelegramByAddress = async (
|
||||
c: Context<HonoCustomType>, address: string
|
||||
): Promise<boolean> => {
|
||||
if (!c.env.KV) return true;
|
||||
const userId = await c.env.KV.get<string>(`${CONSTANTS.TG_KV_PREFIX}:${address}`)
|
||||
if (userId) {
|
||||
return await unbindTelegramAddress(c, userId, address);
|
||||
|
||||
Reference in New Issue
Block a user