youtube_collection
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

24 lines
481 B

package controller
import (
"context"
"github.com/gin-gonic/gin"
entity "youtube_collection_server/entity"
service "youtube_collection_server/service"
)
type userController struct {
}
var UserController userController
func (m *userController) Test(c *gin.Context) {
user1 := entity.User{Name: "one", Age: 11, City: "1 City"}
service.UserServiceInstance.Collection.InsertOne(context.TODO(), user1)
c.JSON(200, gin.H{
"username": "name1",
"data": "data1",
})
}