From 969224aa8b32d2e34888a9947399c5790424310e Mon Sep 17 00:00:00 2001 From: "Michael J. Roberts" Date: Fri, 12 Apr 2024 15:02:15 +0100 Subject: [PATCH] refactor: amend client.telescope.shutdown() in @observerly/hyper. refactor: amend client.telescope.shutdown() in @observerly/hyper. --- src/routes/telescope.ts | 2 +- tests/mocks/telescope.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/routes/telescope.ts b/src/routes/telescope.ts index 3c08626..d7a5273 100644 --- a/src/routes/telescope.ts +++ b/src/routes/telescope.ts @@ -117,7 +117,7 @@ export const telescope = ( >() => { const url = new URL('telescope/shutdown', base) - return dispatchRequest(url, { ...init, method: 'PUT' }, headers) + return dispatchRequest(url, { ...init, method: 'DELETE' }, headers) } }, { diff --git a/tests/mocks/telescope.ts b/tests/mocks/telescope.ts index 446a4c8..59e8b9d 100644 --- a/tests/mocks/telescope.ts +++ b/tests/mocks/telescope.ts @@ -98,12 +98,12 @@ export const telescopeHandlers: Handler[] = [ }) }, { - method: 'PUT', + method: 'DELETE', url: '/api/v1/telescope/shutdown', handler: eventHandler(event => { const method = getMethod(event) - if (method !== 'PUT') { + if (method !== 'DELETE') { return new Response('Method Not Allowed', { status: 405, statusText: 'Method Not Allowed'