MCPcopy Create free account
hub / github.com/RaymondCode/simple-demo / FavoriteAction

Function FavoriteAction

controller/favorite.go:9–17  ·  view source on GitHub ↗

FavoriteAction no practical effect, just check if token is valid

(c *gin.Context)

Source from the content-addressed store, hash-verified

7
8// FavoriteAction no practical effect, just check if token is valid
9func FavoriteAction(c *gin.Context) {
10 token := c.Query("token")
11
12 if _, exist := usersLoginInfo[token]; exist {
13 c.JSON(http.StatusOK, Response{StatusCode: 0})
14 } else {
15 c.JSON(http.StatusOK, Response{StatusCode: 1, StatusMsg: "User doesn't exist"})
16 }
17}
18
19// FavoriteList all users have same favorite video list
20func FavoriteList(c *gin.Context) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected