Commit 9cea854b by Calcium-Ion Committed by GitHub

Merge pull request #2710 from QuantumNous/revert-2691-pr/5f73324da8aebf6a98269c242dda05da3ea6d7bc

Revert "fix: video content api Priority use url field"
parents 64303cfa e1ff2af1
......@@ -12,7 +12,6 @@ import (
"github.com/QuantumNous/new-api/logger"
"github.com/QuantumNous/new-api/model"
"github.com/QuantumNous/new-api/service"
"github.com/samber/lo"
"github.com/gin-gonic/gin"
)
......@@ -135,7 +134,8 @@ func VideoProxy(c *gin.Context) {
videoURL = fmt.Sprintf("%s/v1/videos/%s/content", baseURL, task.TaskID)
req.Header.Set("Authorization", "Bearer "+channel.Key)
default:
videoURL = lo.Ternary(task.Url != "", task.Url, task.FailReason)
// Video URL is directly in task.FailReason
videoURL = task.FailReason
}
req.URL, err = url.Parse(videoURL)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment