summaryrefslogtreecommitdiff
path: root/internal/api/client/admin/debug_off.go
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2024-05-29 12:56:17 +0200
committerLibravatar GitHub <noreply@github.com>2024-05-29 12:56:17 +0200
commitf9a4a6120db69e5ead542cb130533b0c20e2cd66 (patch)
treef2b465c2e79fb63908e8bb7c642f089b0e653020 /internal/api/client/admin/debug_off.go
parent[chore/bugfix] Don't cache MovedTo account (#2939) (diff)
downloadgotosocial-f9a4a6120db69e5ead542cb130533b0c20e2cd66.tar.xz
[feature] Debug admin endpoint to clear caches (#2940)
* [feature] Debug admin endpoint to clear caches * go fmt
Diffstat (limited to 'internal/api/client/admin/debug_off.go')
-rw-r--r--internal/api/client/admin/debug_off.go32
1 files changed, 32 insertions, 0 deletions
diff --git a/internal/api/client/admin/debug_off.go b/internal/api/client/admin/debug_off.go
index bc6e4001c..a43326f02 100644
--- a/internal/api/client/admin/debug_off.go
+++ b/internal/api/client/admin/debug_off.go
@@ -73,3 +73,35 @@ import (
// '500':
// description: internal server error
func (m *Module) DebugAPUrlHandler(c *gin.Context) {}
+
+// DebugClearCachesHandler swagger:operation POST /api/v1/admin/debug/caches/clear debugClearCaches
+//
+// Sweep/clear all in-memory caches.
+//
+// Only enabled / exposed if GoToSocial was built and is running with flag DEBUG=1.
+//
+// ---
+// tags:
+// - debug
+//
+// produces:
+// - application/json
+//
+// security:
+// - OAuth2 Bearer:
+// - admin
+//
+// responses:
+// '200':
+// description: All good baby!
+// '400':
+// description: bad request
+// '401':
+// description: unauthorized
+// '404':
+// description: not found
+// '406':
+// description: not acceptable
+// '500':
+// description: internal server error
+func (m *Module) DebugClearCachesHandler(c *gin.Context) {}