pay admin

This commit is contained in:
jiangyong27 2025-04-01 22:15:54 +08:00
parent a9bc50b334
commit db92e99698
2 changed files with 2 additions and 2 deletions

View File

@ -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

View File

@ -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