This commit is contained in:
2025-03-25 18:28:06 +08:00
parent 80e147ef1e
commit d1c5fb1162
10 changed files with 334 additions and 1 deletions
+24
View File
@@ -0,0 +1,24 @@
package auth
import (
"github.com/gin-gonic/gin"
"log"
"net/http"
)
type SignReq struct {
Email string `json:"email"`
Password string `json:"password"`
}
func Sign(c *gin.Context) {
var req SignReq
if err := c.ShouldBindJSON(&req); err != nil {
c.JSON(http.StatusBadRequest, gin.H{"error": err.Error()})
}
jwt.
c.JSON(http.StatusOK, gin.H{
"data": "hello world",
})
log.Println(req)
}