Fix isHTTPMethod validator
This commit is contained in:
parent
bbf2807cfa
commit
37fcaabdef
@ -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",
|
||||
|
@ -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))
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user