Skip to content

Commit

Permalink
修复团队修改角色bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Dot-Liu committed Aug 12, 2024
1 parent 5d36585 commit cd885a4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ go 1.21
//toolchain go1.21.1

require (
github.com/eolinker/ap-account v1.0.5
github.com/eolinker/ap-account v1.0.6
github.com/eolinker/eosc v0.17.3
github.com/eolinker/go-common v1.0.1
github.com/gabriel-vasile/mimetype v1.4.4
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/r
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc=
github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo=
github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
github.com/eolinker/ap-account v1.0.5 h1:Dx47BL6iPN+6DPuAlzK9fkIgfGBZ5QOrbuocX9p+Aa0=
github.com/eolinker/ap-account v1.0.5/go.mod h1:MViCOvUaS2QrVift1Be3yGjjMywzICL9317eOxoixSI=
github.com/eolinker/ap-account v1.0.6 h1:lzkmaItUoIguEKneUbP387qdgsUgjonKjHDnXsu6lTc=
github.com/eolinker/ap-account v1.0.6/go.mod h1:MViCOvUaS2QrVift1Be3yGjjMywzICL9317eOxoixSI=
github.com/eolinker/eosc v0.17.3 h1:sr2yT+v/AsqEdciRaaZZj0zL9pTufR5RvDW6+65hraQ=
github.com/eolinker/eosc v0.17.3/go.mod h1:xgq816hpanlMXFtZw7Ztdctb1eEk9UPHchY4NfFO6Cw=
github.com/eolinker/go-common v1.0.1 h1:Uan6QmXAlPiX6hc1ptSIHWvaWXNA+VlBjC4gCaDEiz0=
Expand Down
3 changes: 3 additions & 0 deletions module/my-team/iml.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ func (m *imlTeamModule) UpdateMemberRole(ctx context.Context, id string, input *
return err
}
return m.transaction.Transaction(ctx, func(ctx context.Context) error {
if len(input.Roles) < 1 {
return errors.New("at least one role")
}
err = m.roleMemberService.RemoveUserRole(ctx, role.TeamTarget(id), input.Users...)
if err != nil {
return err
Expand Down

0 comments on commit cd885a4

Please sign in to comment.