This commit is contained in:
Maxim Merzhanov authored and Maxim committed 2019-11-01 15:08:37 +03:00
1 parent c1da3c89ad
commit 8a0ebe803a
7 files changed
+25 -17

No files matched your search

+1 -2
View File
@@ -4,7 +4,6 @@ import (
"isp-system-service/entity"
"isp-system-service/model"
"github.com/integration-system/isp-lib/database"
_ "github.com/integration-system/isp-lib/structure"
"github.com/integration-system/isp-lib/utils"
"google.golang.org/grpc/codes"
@@ -146,7 +145,7 @@ func DeleteApplications(list []int32) (DeleteResponse, error) {
return DeleteResponse{}, status.Errorf(codes.InvalidArgument, "At least one id are required")
}
var count = 0
err := database.RunInTransaction(func(appRep model.AppRepository, tokenRep model.TokenRepository) error {
err := model.DbClient.RunInTransaction(func(appRep model.AppRepository, tokenRep model.TokenRepository) error {
for _, appId := range list {
_, err := revokeTokensForApp(Identity{appId}, &tokenRep)
if err != nil {