File tree Expand file tree Collapse file tree 2 files changed +12
-15
lines changed Expand file tree Collapse file tree 2 files changed +12
-15
lines changed Original file line number Diff line number Diff line change @@ -2,11 +2,8 @@ package main
22
33import (
44 "errors"
5- "fmt"
6- "github.com/google/uuid"
75 "github.com/multi-tenants-cms-golang/cms-sys/internal/types"
86 "gorm.io/gorm"
9- "log"
107 "os"
118 "os/signal"
129 "syscall"
@@ -70,17 +67,17 @@ func main() {
7067 appLogger .WithError (err ).Fatal ("Failed to migrate database" )
7168 return
7269 }
73- if err := utils .InitJWTKeysFromVault (); err != nil {
74- log .Fatalf ("Vault key init failed: %v" , err )
75- }
76-
77- uid := uuid .New ()
78- token ,
err := utils .
GenerateAccessToken (
uid ,
"[email protected] " ,
"admin" )
79- if err != nil {
80- log .Fatalf ("token generation failed: %v" , err )
81- }
82-
83- fmt .Println ("JWT:" , token )
70+ // if err := utils.InitJWTKeysFromVault(); err != nil {
71+ // log.Fatalf("Vault key init failed: %v", err)
72+ // }
73+ //
74+ // uid := uuid.New()
75+ // token, err := utils.GenerateAccessToken(uid, "[email protected] ", "admin") 76+ // if err != nil {
77+ // log.Fatalf("token generation failed: %v", err)
78+ // }
79+
80+ // fmt.Println("JWT:", token)
8481 healthChecker := utils .NewHealthChecker (dbConnection .DB , appLogger )
8582
8683 app := fiber .New (fiber.Config {
Original file line number Diff line number Diff line change @@ -100,7 +100,7 @@ const (
100100type UserPageRequest struct {
101101 UserPageRequestID uint `gorm:"primaryKey;autoIncrement" json:"user_page_request_id"`
102102 UserID uuid.UUID `gorm:"type:uuid;not null;unique" json:"user_id"`
103- PageType PageType `gorm:"type:system_check_domain ;not null" json:"pagetype"`
103+ PageType PageType `gorm:"type:varchar(20) ;not null" json:"pagetype"`
104104 Status PageRequestStatus `gorm:"type:varchar(20);default:'PENDING'" json:"status"`
105105
106106 User CMSUser `gorm:"foreignKey:UserID;references:CMSUserID" json:"user,omitempty"`
You can’t perform that action at this time.
0 commit comments