Skip to content

Commit

Permalink
🐛 fix add role issue
Browse files Browse the repository at this point in the history
  • Loading branch information
khalil-farashiani committed Apr 4, 2024
1 parent 87448d5 commit bb1f74e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 0 additions & 2 deletions const.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ const (
unknownLimiterError = "unknown limiter operation"
requiredNameDestinationError = "name and destination is required"
requiredLimiterIDError = "limiter id is required"
createProxyError = "Error creating proxy request"
sendingProxyError = "Error sending proxy request"
slowDownError = "slow down"
notFoundSqlError = "sql: no rows in result set"
)
Expand Down
4 changes: 2 additions & 2 deletions golim.go
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ func (g *golim) createAddCMD() *ff.Command {
if g.skip {
return nil
}
if *limiterID == 0 && *endpoint != "" {
if *limiterID != 0 && *endpoint != "" {
g.limiterRole = &limiterRole{
operation: addRoleOperation,
limiterID: *limiterID,
Expand Down Expand Up @@ -310,7 +310,7 @@ func (g *golim) createGetRolesCMD() *ff.Command {
func toCreateRoleParam(g *golim) role.CreateRoleParams {
return role.CreateRoleParams{
Endpoint: g.limiterRole.endPoint,
Operation: g.limiterRole.operation,
Operation: g.limiterRole.method,
BucketSize: int64(g.limiterRole.bucketSize),
AddTokenPerMin: g.limiterRole.addToken,
InitialTokens: int64(g.limiterRole.initialToken),
Expand Down

0 comments on commit bb1f74e

Please sign in to comment.