0
Fork 0
mirror of https://codeberg.org/SafeTwitch/safetwitch-backend.git synced 2024-12-22 13:13:00 -05:00

Fix label

This commit is contained in:
dragongoose 2023-07-20 14:40:34 -04:00
parent 76c343d63c
commit 927c3fc3d5
No known key found for this signature in database
GPG key ID: 01397EEC371CDAA5

View file

@ -20,12 +20,14 @@ func Routes(route *gin.Engine) {
context.JSON(200, extractor.FormatMessage(data, true)) context.JSON(200, extractor.FormatMessage(data, true))
}) })
vods.GET("/:streamerName", func(context *gin.Context) { vods.GET("/:vodID", func(context *gin.Context) {
data, err := twitch.GetVodMetadata(context.Param("streamerName")) data, err := twitch.GetVodMetadata(context.Param("vodID"))
if err != nil { if err != nil {
context.Error(err) context.Error(err)
return return
} }
data.Type = "vod"
context.JSON(200, extractor.FormatMessage(data, true)) context.JSON(200, extractor.FormatMessage(data, true))
}) })