feature: update dependencies (#682)

This commit is contained in:
Dream Hunter
2025-06-24 18:27:45 +08:00
committed by GitHub
parent 70109785c6
commit 9f535a0a90
12 changed files with 357 additions and 356 deletions

View File

@@ -2,7 +2,7 @@ import { Context, Hono } from 'hono'
import i18n from '../i18n';
import { getBooleanValue, getJsonSetting, checkCfTurnstile, getStringValue, getSplitStringListValue } from '../utils';
import { newAddress, handleListQuery, deleteAddressWithData, getAddressPrefix, getAllowDomains } from '../common'
import { newAddress, handleListQuery, deleteAddressWithData, getAddressPrefix, getAllowDomains, updateAddressUpdatedAt } from '../common'
import { CONSTANTS } from '../constants'
import auto_reply from './auto_reply'
import webhook_settings from './webhook_settings';
@@ -20,27 +20,6 @@ api.post('/api/attachment/delete', s3_attachment.deleteKey)
api.post('/api/attachment/put_url', s3_attachment.getSignedPutUrl)
api.post('/api/attachment/get_url', s3_attachment.getSignedGetUrl)
export async function updateAddressUpdatedAt(
c: Context<HonoCustomType>,
address: string | undefined | null
): Promise<void> {
if (!address) {
return;
}
// update address updated_at
try {
if (address) {
await c.env.DB.prepare(
`UPDATE address SET updated_at = datetime('now') where name = ?`
).bind(address).run();
}
} catch (e) {
console.warn("Failed to update address updated_at")
}
}
api.get('/api/mails', async (c) => {
const { address } = c.get("jwtPayload")
if (!address) {