Added membership for users
This commit is contained in:
parent
acfe6b7d0c
commit
a7cd86962e
5 changed files with 238 additions and 28 deletions
|
|
@ -7,7 +7,7 @@ import (
|
|||
"planner/models"
|
||||
)
|
||||
|
||||
func extract_user(orm *gorm.DB, c *gin.Context) *models.User {
|
||||
func ExtractUser(orm *gorm.DB, c *gin.Context) *models.User {
|
||||
username, _, ok := c.Request.BasicAuth()
|
||||
if !ok {
|
||||
c.Status(http.StatusUnauthorized)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue