fix(video_proxy): update task retrieval to include user ID for improved context
This commit is contained in:
@@ -35,7 +35,8 @@ func VideoProxy(c *gin.Context) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
task, exists, err := model.GetByOnlyTaskId(taskID)
|
userID := c.GetInt("id")
|
||||||
|
task, exists, err := model.GetByTaskId(userID, taskID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
logger.LogError(c.Request.Context(), fmt.Sprintf("Failed to query task %s: %s", taskID, err.Error()))
|
logger.LogError(c.Request.Context(), fmt.Sprintf("Failed to query task %s: %s", taskID, err.Error()))
|
||||||
videoProxyError(c, http.StatusInternalServerError, "server_error", "Failed to query task")
|
videoProxyError(c, http.StatusInternalServerError, "server_error", "Failed to query task")
|
||||||
|
|||||||
Reference in New Issue
Block a user