From 755cff30333ee10d7ee451953a15b4b200ba2027 Mon Sep 17 00:00:00 2001 From: Tom Winter Date: Thu, 14 Mar 2024 11:02:47 +0100 Subject: [PATCH] fix: switch sort order in DefaultAddWebhookSubscriptionUseCase --- .../notification/core/DefaultAddWebhookSubscriptionUseCase.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/aam-backend-service/src/main/kotlin/com/aamdigital/aambackendservice/reporting/notification/core/DefaultAddWebhookSubscriptionUseCase.kt b/application/aam-backend-service/src/main/kotlin/com/aamdigital/aambackendservice/reporting/notification/core/DefaultAddWebhookSubscriptionUseCase.kt index 238013c..0cdaaf2 100644 --- a/application/aam-backend-service/src/main/kotlin/com/aamdigital/aambackendservice/reporting/notification/core/DefaultAddWebhookSubscriptionUseCase.kt +++ b/application/aam-backend-service/src/main/kotlin/com/aamdigital/aambackendservice/reporting/notification/core/DefaultAddWebhookSubscriptionUseCase.kt @@ -33,7 +33,7 @@ class DefaultAddWebhookSubscriptionUseCase( report = report, webhook = webhook, reportCalculation = DomainReference( - calculations.sortedBy { it.endDate }.first().id + calculations.sortedByDescending { it.endDate }.first().id ) ) Mono.just(Unit)