Skip to content

Commit

Permalink
FIX #777 - able to compute apikey even if api is blocked
Browse files Browse the repository at this point in the history
  • Loading branch information
quentinovega committed Jan 9, 2025
1 parent af91447 commit b0b29cc
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions daikoku/app/utils/ApiService.scala
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@ class ApiService(
.findOneNotDeleted(
Json.obj(
"_id" -> subscription.api.value,
"state" -> ApiState.publishedJsonFilter
// "state" -> ApiState.publishedJsonFilter
)
),
AppError.EntityNotFound(
Expand Down Expand Up @@ -846,7 +846,7 @@ class ApiService(
.findOneNotDeleted(
Json.obj(
"_id" -> subscription.api.value,
"state" -> ApiState.publishedJsonFilter
// "state" -> ApiState.publishedJsonFilter
)
),
AppError.ApiNotFound
Expand Down Expand Up @@ -974,8 +974,7 @@ class ApiService(
}
apk <- EitherT(computeOtoroshiApiKey(parentSubscription))
_ <- EitherT(otoroshiClient.updateApiKey(apk))
_ <-
paymentClient.toggleStateThirdPartySubscription(updatedSubscription)
_ <- paymentClient.toggleStateThirdPartySubscription(updatedSubscription)
} yield updatedSubscription.asSafeJson.as[JsObject]

r.value
Expand Down

0 comments on commit b0b29cc

Please sign in to comment.