pay admin
This commit is contained in:
parent
a9bc50b334
commit
db92e99698
|
@ -51,7 +51,7 @@ func (s *Salary) Update(ctx *gin.Context) {
|
||||||
|
|
||||||
func (s *Salary) Pay(ctx *gin.Context) {
|
func (s *Salary) Pay(ctx *gin.Context) {
|
||||||
sess := ctx.Keys[session.ContextSession].(*session.AdminSession)
|
sess := ctx.Keys[session.ContextSession].(*session.AdminSession)
|
||||||
if !sess.GetAdmin().GetConfig().IsFinance() {
|
if !sess.GetAdmin().GetConfig().IsAdmin() {
|
||||||
panic(config.ErrPriv.New())
|
panic(config.ErrPriv.New())
|
||||||
}
|
}
|
||||||
var req api.PaySalaryReq
|
var req api.PaySalaryReq
|
||||||
|
|
|
@ -91,7 +91,7 @@ func (s *Staff) Delete(ctx *gin.Context) {
|
||||||
|
|
||||||
func (s *Staff) Pay(ctx *gin.Context) {
|
func (s *Staff) Pay(ctx *gin.Context) {
|
||||||
sess := ctx.Keys[session.ContextSession].(*session.AdminSession)
|
sess := ctx.Keys[session.ContextSession].(*session.AdminSession)
|
||||||
if !sess.GetAdmin().GetConfig().IsFinance() {
|
if !sess.GetAdmin().GetConfig().IsAdmin() {
|
||||||
panic(config.ErrPriv.New())
|
panic(config.ErrPriv.New())
|
||||||
}
|
}
|
||||||
var req api.StaffPayReq
|
var req api.StaffPayReq
|
||||||
|
|
Loading…
Reference in New Issue