Merge pull request #16 from pleshevskiy/task-13
feat(request-hook): allow autofetching for...
This commit is contained in:
commit
cf61435259
1 changed files with 1 additions and 1 deletions
|
@ -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`
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
Reference in a new issue