// CreateAction creates a new user
CreateAction creates a new user
// CreateAction creates a new user
func (this UserController) CreateAction(c *gin.Context) {
	uReq := mrequest.UserCreate{}
	fmt.Println(uReq)
	json.NewDecoder(c.Request.Body).Decode(&uReq)
	e := errors.ValidateRequest(&uReq)
	if e != nil {
		c.JSON(e.HttpCode, e)
		return
	}
	uRes, err := this.UserService.CreateOne(&uReq)
	if err != nil {
		c.JSON(err.HttpCode, err)
		return
	}
	c.JSON(200, uRes)
}
func ( this UserController ) CreateAction ( c * gin . Context ) { uReq := mrequest . UserCreate { } fmt . Println ( uReq ) json . NewDecoder ( c . Request . Body ) . Decode ( & uReq ) e := errors . ValidateRequest ( & uReq ) if e != nil { c . JSON ( e . HttpCode , e ) return } uRes , err := this . UserService . CreateOne ( & uReq ) if err != nil { c . JSON ( err . HttpCode , err ) return } c . JSON ( 200 , uRes ) }
CreateAction creates a new user
CreateAction creates a new user