@@ -4,6 +4,5 @@ import "github.com/gin-gonic/gin"
|
||||
|
||||
func Handler(r *gin.RouterGroup) {
|
||||
r.POST("/magic", RequestMagicLink)
|
||||
r.GET("/magic/verify", VerifyMagicLink)
|
||||
r.POST("/refresh", Refresh)
|
||||
}
|
||||
|
||||
@@ -81,8 +81,8 @@ func VerifyMagicLink(c *gin.Context) {
|
||||
}
|
||||
|
||||
// Verify if user exists
|
||||
user := new(data.User)
|
||||
err := user.GetByEmail(email)
|
||||
userData := new(data.User)
|
||||
user, err := userData.GetByEmail(email)
|
||||
|
||||
if err != nil {
|
||||
if err == gorm.ErrRecordNotFound {
|
||||
|
||||
1
service/auth/redirect.go
Normal file
1
service/auth/redirect.go
Normal file
@@ -0,0 +1 @@
|
||||
package auth
|
||||
1
service/auth/token.go
Normal file
1
service/auth/token.go
Normal file
@@ -0,0 +1 @@
|
||||
package auth
|
||||
Reference in New Issue
Block a user