@ -104,8 +104,10 @@ func initDirectory(conf *Config) {
}
var mode string
var logMode LogMode
var (
mode string
logMode LogMode
)
func IsDev() bool {
return mode == "development"
@ -78,7 +78,6 @@ func (l *LinkHandler) UpdateLink(ctx *gin.Context) (interface{}, error) {
linkParam := ¶m.Link{}
err = ctx.ShouldBindJSON(linkParam)
if err != nil {
e := validator.ValidationErrors{}
if errors.As(err, &e) {
@ -136,7 +136,6 @@ func (m *MenuHandler) UpdateMenu(ctx *gin.Context) (interface{}, error) {
menuParam := ¶m.Menu{}
err = ctx.ShouldBindJSON(menuParam)
@ -81,7 +81,6 @@ func (t *TagHandler) UpdateTag(ctx *gin.Context) (interface{}, error) {
tagParam := ¶m.Tag{}
err = ctx.ShouldBindJSON(tagParam)