From bbadde1fbf53dd779945164c323ee1e69333ea9b Mon Sep 17 00:00:00 2001 From: Jack Ding <7378668+jzding@users.noreply.github.com> Date: Wed, 21 Aug 2024 17:18:52 -0400 Subject: [PATCH] v2 clean up subscriptions: cleanup in memory store (#78) Signed-off-by: Jack Ding --- v2/routes.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/v2/routes.go b/v2/routes.go index f1c4d4e..6ba577a 100644 --- a/v2/routes.go +++ b/v2/routes.go @@ -365,6 +365,11 @@ func (s *Server) deleteAllSubscriptions(w http.ResponseWriter, _ *http.Request) respondWithError(w, err.Error()) return } + // empty the store in memory + if err = s.pubSubAPI.DeleteAllSubscriptions(); err != nil { + respondWithError(w, err.Error()) + return + } respondWithStatusCode(w, http.StatusNoContent, "") }