feature: add /user_api/mails with filter params address and keyword (#639)

This commit is contained in:
Dream Hunter
2025-04-24 02:01:21 +08:00
committed by GitHub
parent c6afc5d425
commit 95f361743b
19 changed files with 1124 additions and 887 deletions
+13
View File
@@ -1,6 +1,8 @@
import { LocaleMessages } from "./type";
import zh from "./zh";
import en from "./en";
import { HonoCustomType } from "../types";
import { Context } from "hono";
export default {
getMessages: (
@@ -10,6 +12,17 @@ export default {
if (locale === "en") return en;
if (locale === "zh") return zh;
// fallback language
return en;
},
getMessagesbyContext: (
c: Context<HonoCustomType>
): LocaleMessages => {
const locale = c.get("lang") || c.env.DEFAULT_LANG;
// multi-language support
if (locale === "en") return en;
if (locale === "zh") return zh;
// fallback language
return en;
}