From eafe345642d8b7f6129381dfeabe936ddf03c655 Mon Sep 17 00:00:00 2001 From: Shashank Verma Date: Tue, 31 Oct 2023 16:08:02 +0530 Subject: [PATCH] controller: SuperAdminController: Add API point to invalidate all stamps Signed-off-by: Shashank Verma --- .../controller/SuperAdminController.kt | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/main/kotlin/com/mnnit/moticlubs/controller/SuperAdminController.kt b/src/main/kotlin/com/mnnit/moticlubs/controller/SuperAdminController.kt index a97401a..95351df 100644 --- a/src/main/kotlin/com/mnnit/moticlubs/controller/SuperAdminController.kt +++ b/src/main/kotlin/com/mnnit/moticlubs/controller/SuperAdminController.kt @@ -110,4 +110,22 @@ class SuperAdminController( ResponseStamp.ADMIN } .wrapError() + + @PostMapping("/invalidate_stamps") + @Operation(summary = "Invalidate all variants of stamps") + fun invalidateStamp(): Mono> = pathAuthorization + .superAdminAuthorization() + .flatMap { Mono.just(it).then() } + .invalidateStamp { + ResponseStamp.NONE.invalidateStamp() + ResponseStamp.ADMIN.invalidateStamp() + ResponseStamp.CHANNEL.invalidateStamp() + ResponseStamp.CLUB.invalidateStamp() + ResponseStamp.MEMBER.invalidateStamp() + ResponseStamp.POST.invalidateStamp() + ResponseStamp.REPLY.invalidateStamp() + ResponseStamp.URL.invalidateStamp() + ResponseStamp.USER + } + .wrapError() }