fix: panels not working due to validator versions

Signed-off-by: Ben Hall <ben@benh.codes>
This commit is contained in:
Ben Hall 2025-02-09 13:36:54 +00:00
parent 12aa6a10b2
commit a453d9ac08
3 changed files with 6 additions and 5 deletions

View File

@ -419,11 +419,14 @@ func ImportHandler(ctx *gin.Context) {
// Import forms
for _, form := range data.Forms {
if _, ok := formIdMap[form.Id]; !ok {
fmt.Println("Creating form", form.Title)
formId, err := dbclient.Client.Forms.Create(ctx, guildId, form.Title, form.CustomId)
if err != nil {
return
}
fmt.Println("Form ID", form.Id, "New ID", formId)
formIdMap[form.Id] = formId
}
}
@ -499,9 +502,7 @@ func ImportHandler(ctx *gin.Context) {
}
if panel.WelcomeMessageEmbed != nil {
fmt.Println(*panel.WelcomeMessageEmbed)
newEmbedId := embedMap[*panel.WelcomeMessageEmbed]
fmt.Println(newEmbedId)
panel.WelcomeMessageEmbed = &newEmbedId
}

2
go.mod
View File

@ -14,7 +14,7 @@ require (
github.com/getsentry/sentry-go v0.24.0
github.com/gin-gonic/contrib v0.0.0-20191209060500-d6e26eeaa607
github.com/gin-gonic/gin v1.9.1
github.com/go-playground/validator/v10 v10.22.0
github.com/go-playground/validator/v10 v10.14.0
github.com/go-redis/redis v6.15.9+incompatible
github.com/go-redis/redis/v8 v8.11.5
github.com/go-redis/redis_rate/v9 v9.1.1

4
go.sum
View File

@ -170,8 +170,8 @@ github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+
github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY=
github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY=
github.com/go-playground/validator/v10 v10.4.1/go.mod h1:nlOn6nFhuKACm19sB/8EGNn9GlaMV7XkbRSipzJ0Ii4=
github.com/go-playground/validator/v10 v10.22.0 h1:k6HsTZ0sTnROkhS//R0O+55JgM8C4Bx7ia+JlgcnOao=
github.com/go-playground/validator/v10 v10.22.0/go.mod h1:dbuPbCMFw/DrkbEynArYaCwl3amGuJotoKCe95atGMM=
github.com/go-playground/validator/v10 v10.14.0 h1:vgvQWe3XCz3gIeFDm/HnTIbj6UGmg/+t63MyGU2n5js=
github.com/go-playground/validator/v10 v10.14.0/go.mod h1:9iXMNT7sEkjXb0I+enO7QXmzG6QCsPWY4zveKFVRSyU=
github.com/go-redis/redis v6.15.9+incompatible h1:K0pv1D7EQUjfyoMql+r/jZqCLizCGKFlFgcHWWmHQjg=
github.com/go-redis/redis v6.15.9+incompatible/go.mod h1:NAIEuMOZ/fxfXJIrKDQDz8wamY7mA7PouImQ2Jvg6kA=
github.com/go-redis/redis/v7 v7.4.0 h1:7obg6wUoj05T0EpY0o8B59S9w5yeMWql7sw2kwNW1x4=