Skip to content

Commit 005a64e

Browse files
Merge pull request #101 from observerly/refactor/telescope/shutdown
refactor: amend client.telescope.shutdown() in @observerly/hyper.
2 parents e3bb1e2 + 969224a commit 005a64e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/routes/telescope.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ export const telescope = (
117117
>() => {
118118
const url = new URL('telescope/shutdown', base)
119119

120-
return dispatchRequest<T>(url, { ...init, method: 'PUT' }, headers)
120+
return dispatchRequest<T>(url, { ...init, method: 'DELETE' }, headers)
121121
}
122122
},
123123
{

tests/mocks/telescope.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -98,12 +98,12 @@ export const telescopeHandlers: Handler[] = [
9898
})
9999
},
100100
{
101-
method: 'PUT',
101+
method: 'DELETE',
102102
url: '/api/v1/telescope/shutdown',
103103
handler: eventHandler(event => {
104104
const method = getMethod(event)
105105

106-
if (method !== 'PUT') {
106+
if (method !== 'DELETE') {
107107
return new Response('Method Not Allowed', {
108108
status: 405,
109109
statusText: 'Method Not Allowed'

0 commit comments

Comments
 (0)