Skip to content

Commit f805fcb

Browse files
committedMar 20, 2025
update typo
1 parent e69f73f commit f805fcb

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed
 

‎ddl.sql

+4-4
Original file line numberDiff line numberDiff line change
@@ -109,10 +109,10 @@ CREATE TABLE IF NOT EXISTS auth_permission (
109109
id UUID PRIMARY KEY NOT NULL DEFAULT (UUID()),
110110
group_id UUID NOT null,
111111
function_id UUID NOT null,
112-
grand_create TINYINT(1) NOT NULL DEFAULT 0,
113-
grand_read TINYINT(1) NOT NULL DEFAULT 0,
114-
grand_update TINYINT(1) NOT NULL DEFAULT 0,
115-
grand_delete TINYINT(1) NOT NULL DEFAULT 0,
112+
grant_create TINYINT(1) NOT NULL DEFAULT 0,
113+
grant_read TINYINT(1) NOT NULL DEFAULT 0,
114+
grant_update TINYINT(1) NOT NULL DEFAULT 0,
115+
grant_delete TINYINT(1) NOT NULL DEFAULT 0,
116116
created_at DATETIME not NULL DEFAULT CURRENT_TIMESTAMP(),
117117
created_by VARCHAR(255) NOT NULL,
118118
modified_at DATETIME NULL,

‎repository/dao/entity.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -102,10 +102,10 @@ type AuthFunctionLang struct {
102102
type AuthPermission struct {
103103
GroupID uuid.UUID `gorm:"type:uuid;not null"`
104104
FunctionID uuid.UUID `gorm:"type:uuid;not null"`
105-
GrandCreate int `gorm:"type:tinyint(1);not null;default:0"`
106-
GrandRead int `gorm:"type:tinyint(1);not null;default:0"`
107-
GrandUpdate int `gorm:"type:tinyint(1);not null;default:0"`
108-
GrandDelete int `gorm:"type:tinyint(1);not null;default:0"`
105+
GrantCreate int `gorm:"type:tinyint(1);not null;default:0"`
106+
GrantRead int `gorm:"type:tinyint(1);not null;default:0"`
107+
GrantUpdate int `gorm:"type:tinyint(1);not null;default:0"`
108+
GrantDelete int `gorm:"type:tinyint(1);not null;default:0"`
109109
Function AuthFunction `gorm:"foreignKey:FunctionID;references:ID;constraint:OnDelete:CASCADE"`
110110
AuditorDAO
111111
}

‎routers/routers.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ func HandleRouter(app *fiber.App) {
2323
api.Get("/auth/logout", middleware.SetMiddlewareAUTH(false), controllers.AuthLogout)
2424
api.Get("/auth/refresh-token", middleware.SetMiddlewareAUTH(false), controllers.AuthRefreshTokens)
2525
api.Get("/auth/me", middleware.SetMiddlewareAUTH(false), controllers.AuthMe)
26-
api.Get("/auth/chek-access", middleware.SetMiddlewareAUTH(false), controllers.CheckAccess)
26+
api.Post("/auth/chek-access", middleware.SetMiddlewareAUTH(false), controllers.CheckAccess)
2727

2828
api.Get("/portal", middleware.SetMiddlewareAUTH(true), controllers.GetPortal)
2929
api.Post("/portal", middleware.SetMiddlewareAUTH(true), controllers.SavePortal)

0 commit comments

Comments
 (0)