From c1fb307f9aa6e82515cdc9a4873bc8511a5e847c Mon Sep 17 00:00:00 2001 From: Gauthier Roebroeck Date: Wed, 12 Feb 2025 11:42:57 +0800 Subject: [PATCH] fix(api): oauth2 providers endpoint should only expose get --- .../org/gotson/komga/interfaces/api/rest/OAuth2Controller.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/OAuth2Controller.kt b/komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/OAuth2Controller.kt index 2ec1eaf3..affe4bf9 100644 --- a/komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/OAuth2Controller.kt +++ b/komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/OAuth2Controller.kt @@ -2,6 +2,7 @@ package org.gotson.komga.interfaces.api.rest import org.springframework.http.MediaType import org.springframework.security.oauth2.client.registration.InMemoryClientRegistrationRepository +import org.springframework.web.bind.annotation.GetMapping import org.springframework.web.bind.annotation.RequestMapping import org.springframework.web.bind.annotation.RestController @@ -15,7 +16,7 @@ class OAuth2Controller( OAuth2ClientDto(it.clientName, it.registrationId) } ?: emptyList() - @RequestMapping("providers") + @GetMapping("providers") fun getProviders() = registrationIds }