Able to manage channels now

This commit is contained in:
JustSong
2023-04-23 15:42:23 +08:00
parent 63da6dc6a0
commit 9fc375c604
9 changed files with 196 additions and 216 deletions

View File

@@ -82,6 +82,8 @@ func AddChannel(c *gin.Context) {
})
return
}
channel.CreatedTime = common.GetTimestamp()
channel.AccessedTime = common.GetTimestamp()
err = channel.Insert()
if err != nil {
c.JSON(http.StatusOK, gin.H{
@@ -136,6 +138,7 @@ func UpdateChannel(c *gin.Context) {
c.JSON(http.StatusOK, gin.H{
"success": true,
"message": "",
"data": channel,
})
return
}