Refactor mass data structure
Some checks failed
Build Backend (NixCN CMS) TeamCity build failed
Build Frontend (NixCN CMS) TeamCity build finished

Signed-off-by: Asai Neko <sugar@sne.moe>
This commit is contained in:
2026-01-01 13:29:59 +08:00
parent 8973d518a2
commit acd3c95c80
11 changed files with 518 additions and 279 deletions

View File

@@ -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)
}

View File

@@ -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
View File

@@ -0,0 +1 @@
package auth

1
service/auth/token.go Normal file
View File

@@ -0,0 +1 @@
package auth