Skip to content

Commit

Permalink
v2 clean up subscriptions: cleanup in memory store (#78)
Browse files Browse the repository at this point in the history
Signed-off-by: Jack Ding <[email protected]>
  • Loading branch information
jzding authored Aug 21, 2024
1 parent d6f8679 commit 3b5f656
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions v2/routes.go
Original file line number Diff line number Diff line change
Expand Up @@ -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, "")
}
Expand Down

0 comments on commit 3b5f656

Please sign in to comment.