Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
shohamroditimemphis committed Nov 23, 2023
1 parent fe3cb9c commit 7b98e91
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions server/memphis_handlers_user_mgmt.go
Original file line number Diff line number Diff line change
Expand Up @@ -162,10 +162,16 @@ func removeTenantResources(tenantName string, user models.User) error {
}
// TODO: send response of DeleteAndGetAttachedFunctionsByStation to microservice to delete

err = db.RemoveStationsByTenant(tenantName)
if err != nil {
return err
}

err = sendDeleteAllFunctionsReqToMS(user, tenantName, "github", "", "", "aws_lambda", "", true)
if err != nil {
return err
}

err = deleteInstallationForAuthenticatedGithubApp(user.TenantName)
if err != nil {
return err
Expand Down Expand Up @@ -193,11 +199,6 @@ func removeTenantResources(tenantName string, user models.User) error {
return err
}

err = db.RemoveStationsByTenant(tenantName)
if err != nil {
return err
}

if tenantName != MEMPHIS_GLOBAL_ACCOUNT {
err = db.RemoveTenant(tenantName)
if err != nil {
Expand Down

0 comments on commit 7b98e91

Please sign in to comment.