Merge pull request #16 from pleshevskiy/task-13

feat(request-hook): allow autofetching for...
This commit is contained in:
Dmitriy Pleshevskiy 2020-11-06 03:58:31 +02:00 committed by GitHub
commit cf61435259
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -15,7 +15,7 @@ export function useRequest<R = Record<string, any>, V = Record<string, any>, P =
config?: RequestConfig<R, V, P>, config?: RequestConfig<R, V, P>,
) { ) {
invariant( invariant(
endpoint.method == Method.GET, endpoint.method !== Method.DELETE,
`You cannot use useRequest with ${endpoint.method} method` `You cannot use useRequest with ${endpoint.method} method`
); );