Skip to content

Commit 37eecfb

Browse files
committed
🐛 fix out of bound error in save_role API operation
1 parent 7c3f854 commit 37eecfb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

api/save_role.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ func SaveRoleUsecase(authDb *auth.Database) usecase.Interactor {
3131
req SaveRoleRequest,
3232
resp *SaveRoleResponse,
3333
) error {
34-
scopes := make([]auth.Scope, 0, len(req.Scopes))
34+
scopes := make([]auth.Scope, len(req.Scopes))
3535

3636
for i, scopeName := range req.Scopes {
3737
scope, err := auth.ParseScope(scopeName)

0 commit comments

Comments
 (0)