add it
This commit is contained in:
@@ -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)
|
||||
}
|
||||
Reference in New Issue
Block a user