0
Fork 0
mirror of https://codeberg.org/SafeTwitch/safetwitch-backend.git synced 2025-01-03 03:10:05 -05:00

Fix error not being returned properly

This commit is contained in:
dragongoose 2023-12-02 11:49:22 -05:00
parent 25d2da75b9
commit 7d7994e371
No known key found for this signature in database
GPG key ID: 01397EEC371CDAA5

View file

@ -37,11 +37,13 @@ func Routes(route *gin.Engine) {
err := context.ShouldBindJSON(&f) err := context.ShouldBindJSON(&f)
if err != nil { if err != nil {
context.Error(err) context.Error(err)
return
} }
data, err := twitch.GetBulkStreamerInfo(f.Streamers) data, err := twitch.GetBulkStreamerInfo(f.Streamers)
if err != nil { if err != nil {
context.Error(err) context.Error(err)
return
} }
context.JSON(200, extractor.FormatMessage(data, true)) context.JSON(200, extractor.FormatMessage(data, true))
}) })