diff --git a/src/routes/camera.ts b/src/routes/camera.ts index a823bdd..2e4a3fd 100644 --- a/src/routes/camera.ts +++ b/src/routes/camera.ts @@ -73,7 +73,7 @@ export const camera = (base: URL, init?: RequestInit, headers?: () => Promise() => { const url = new URL('camera/shutdown', base) - return dispatchRequest(url, { ...init, method: 'PUT' }, headers) + return dispatchRequest(url, { ...init, method: 'DELETE' }, headers) } }, { diff --git a/tests/mocks/camera.ts b/tests/mocks/camera.ts index 5415bb1..0e3015b 100644 --- a/tests/mocks/camera.ts +++ b/tests/mocks/camera.ts @@ -25,12 +25,12 @@ export const cameraHandlers: Handler[] = [ }) }, { - method: 'PUT', + method: 'DELETE', url: '/api/v1/camera/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'