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:
parent
25d2da75b9
commit
7d7994e371
1 changed files with 2 additions and 0 deletions
|
@ -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))
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue