fix: change account_id to accountID to match PublishVideo(func)

This commit is contained in:
Leon
2025-12-07 17:39:03 +08:00
parent 466817d6ad
commit 8dcc13957b

View File

@@ -43,14 +43,14 @@ func (vh *VideoHandler) PublishVideo(c *gin.Context) {
c.JSON(400, gin.H{"error": "play url is required"}) c.JSON(400, gin.H{"error": "play url is required"})
return return
} }
uidValue, exists := c.Get("account_id") uidValue, exists := c.Get("accountID")
if !exists { if !exists {
c.JSON(400, gin.H{"error": "account_id not found"}) c.JSON(400, gin.H{"error": "accountID not found"})
return return
} }
authorID, ok := uidValue.(uint) authorID, ok := uidValue.(uint)
if !ok { if !ok {
c.JSON(400, gin.H{"error": "account_id has invalid type"}) c.JSON(400, gin.H{"error": "accountID has invalid type"})
return return
} }
video := &video.Video{ video := &video.Video{