Hardcode -> not hardcode :)
This commit is contained in:
parent
93c221ffad
commit
4954b1dacc
|
@ -19,7 +19,7 @@ var articleModel = new(models.ArticleModel)
|
|||
|
||||
//Create ...
|
||||
func (ctrl ArticleController) Create(c *gin.Context) {
|
||||
userID := 1
|
||||
userID := getUserID(c)
|
||||
|
||||
if userID == 0 {
|
||||
c.JSON(http.StatusForbidden, gin.H{"message": "Please login first"})
|
||||
|
|
Loading…
Reference in New Issue