fix: change account_id to accountID to match PublishVideo(func)
This commit is contained in:
@@ -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{
|
||||||
|
|||||||
Reference in New Issue
Block a user