This commit is contained in:
[Valentino Heman Budiarto] 2026-04-02 15:44:59 +07:00
parent ff78042fe4
commit 94daad0c1f
2 changed files with 5 additions and 6 deletions

View File

@ -27,7 +27,7 @@ type LoginInput struct {
Password string `json:"password" binding:"required"`
}
// --- FUNGSI REGISTER ---
// FUNGSI REGISTER
func Register(c *gin.Context) {
var input RegisterInput
if err := c.ShouldBindJSON(&input); err != nil {
@ -79,7 +79,6 @@ func Login(c *gin.Context) {
}
// 4. Bikin Token JWT (Tiket Masuk)
// Token berlaku selama 24 jam
expirationTime := time.Now().Add(24 * time.Hour)
claims := &jwt.MapClaims{
"user_id": user.UserID,