From db92e9969842aa36c68244822fe6fbcc1caae502 Mon Sep 17 00:00:00 2001 From: jiangyong27 Date: Tue, 1 Apr 2025 22:15:54 +0800 Subject: [PATCH] pay admin --- server/controller/salary.go | 2 +- server/controller/staff.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/server/controller/salary.go b/server/controller/salary.go index f5b7110..1098a8d 100644 --- a/server/controller/salary.go +++ b/server/controller/salary.go @@ -51,7 +51,7 @@ func (s *Salary) Update(ctx *gin.Context) { func (s *Salary) Pay(ctx *gin.Context) { sess := ctx.Keys[session.ContextSession].(*session.AdminSession) - if !sess.GetAdmin().GetConfig().IsFinance() { + if !sess.GetAdmin().GetConfig().IsAdmin() { panic(config.ErrPriv.New()) } var req api.PaySalaryReq diff --git a/server/controller/staff.go b/server/controller/staff.go index 6f38d2f..d386a24 100644 --- a/server/controller/staff.go +++ b/server/controller/staff.go @@ -91,7 +91,7 @@ func (s *Staff) Delete(ctx *gin.Context) { func (s *Staff) Pay(ctx *gin.Context) { sess := ctx.Keys[session.ContextSession].(*session.AdminSession) - if !sess.GetAdmin().GetConfig().IsFinance() { + if !sess.GetAdmin().GetConfig().IsAdmin() { panic(config.ErrPriv.New()) } var req api.StaffPayReq