From 37fcaabdef1a4e82bfc437703231eb6c8bddd2ac Mon Sep 17 00:00:00 2001 From: garrettmills Date: Mon, 14 Nov 2022 21:48:28 -0600 Subject: [PATCH] Fix isHTTPMethod validator --- package.json | 2 +- src/http/lifecycle/Request.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index fee47dd..589102a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@extollo/lib", - "version": "0.14.9", + "version": "0.14.10", "description": "The framework library that lifts up your code.", "main": "lib/index.js", "types": "lib/index.d.ts", diff --git a/src/http/lifecycle/Request.ts b/src/http/lifecycle/Request.ts index ac440f4..aaa4c09 100644 --- a/src/http/lifecycle/Request.ts +++ b/src/http/lifecycle/Request.ts @@ -20,7 +20,7 @@ export type HTTPMethod = 'post' | 'get' | 'patch' | 'put' | 'delete' | 'options' * @param what */ export function isHTTPMethod(what: unknown): what is HTTPMethod { - return ['post', 'get', 'patch', 'put', 'delete'].includes(String(what)) + return ['post', 'get', 'patch', 'put', 'delete', 'options'].includes(String(what)) } /**