fix(api): monitor, replay

This commit is contained in:
ttk
2024-09-06 19:45:01 +08:00
parent 5a63cc375a
commit a30bd94541
6 changed files with 75 additions and 96 deletions

View File

@@ -83,6 +83,9 @@ func (ae *ApiError) Message(localizer *i18n.Localizer) (msg string) {
}
func (ae *ApiError) MessageWithCtx(ctx *gin.Context) string {
if ae == nil {
return ""
}
lang := ctx.PostForm("lang")
accept := ctx.GetHeader("Accept-Language")
localizer := i18n.NewLocalizer(myi18n.Bundle, lang, accept)