Skip to content

Commit

Permalink
fix: cannot delete addres when not bind KV (#284)
Browse files Browse the repository at this point in the history
  • Loading branch information
dreamhunter2333 authored May 29, 2024
1 parent 1f8edbc commit 00abf79
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<!-- markdownlint-disable-file MD004 MD024 MD034 MD036 -->
# CHANGE LOG

## main branch
## v0.4.6

- worker 配置文件添加 `TITLE = "Custom Title"`, 可自定义网站标题
- 修复 KV 未绑定无法删除地址的问题

## v0.4.5

Expand Down
2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cloudflare_temp_email",
"version": "0.4.5",
"version": "0.4.6",
"private": true,
"type": "module",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion worker/src/constants.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export const CONSTANTS = {
VERSION: 'v0.4.5',
VERSION: 'v0.4.6',

// DB settings
ADDRESS_BLOCK_LIST_KEY: 'address_block_list',
Expand Down
1 change: 1 addition & 0 deletions worker/src/telegram_api/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 00abf79

Please sign in to comment.