Skip to content

Commit

Permalink
Remove dup code
Browse files Browse the repository at this point in the history
  • Loading branch information
hsluoyz committed Aug 19, 2023
1 parent 77614d9 commit f914ffe
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 8 deletions.
4 changes: 0 additions & 4 deletions casdoorsdk/permission.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,6 @@ func (c *Client) GetPaginationPermissions(p int, pageSize int, queryMap map[stri
return nil, 0, err
}

if response.Status != "ok" {
return nil, 0, fmt.Errorf(response.Msg)
}

permissions, ok := response.Data.([]*Permission)
if !ok {
return nil, 0, errors.New("response data format is incorrect")
Expand Down
4 changes: 0 additions & 4 deletions casdoorsdk/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -288,10 +288,6 @@ func (c *Client) GetPaginationUsers(p int, pageSize int, queryMap map[string]str
return nil, 0, err
}

if response.Status != "ok" {
return nil, 0, fmt.Errorf(response.Msg)
}

users, ok := response.Data.([]*User)
if !ok {
return nil, 0, errors.New("response data format is incorrect")
Expand Down

0 comments on commit f914ffe

Please sign in to comment.