From 4f12238930e019f44e5e5068490a7da774255546 Mon Sep 17 00:00:00 2001 From: donggyu Date: Mon, 22 Apr 2024 17:04:41 +0900 Subject: [PATCH] bugfix. fix delete tks role API --- internal/usecase/role.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/internal/usecase/role.go b/internal/usecase/role.go index a07f0e92..58344f2a 100644 --- a/internal/usecase/role.go +++ b/internal/usecase/role.go @@ -57,7 +57,11 @@ func (r RoleUsecase) GetTksRole(ctx context.Context, organizationId string, id s } func (r RoleUsecase) DeleteTksRole(ctx context.Context, organizationId string, id string) error { - err := r.kc.DeleteGroup(ctx, organizationId, id) + role, err := r.repo.GetTksRole(ctx, organizationId, id) + if err != nil { + return err + } + err = r.kc.DeleteGroup(ctx, organizationId, role.Name+"@"+organizationId) if err != nil { return err }