diff --git a/src/service/api.js b/src/service/api.js index 314e62bd..64c92185 100644 --- a/src/service/api.js +++ b/src/service/api.js @@ -108,7 +108,7 @@ export const api = createApi({ }, }), getBatch: builder.query({ - query: ({ id }) => ({ url: `batch/${id}/`, method: 'get' }), + query: ({ id }) => ({ url: `batch/${id}/`, method: 'get', timeout: 30 * 1000 }), providesTags: (result, _err, { id }) => { const tags = [{ type: 'Batch', id }]; // TODO: Add petitions from this result to redux store diff --git a/src/service/axios.js b/src/service/axios.js index c2044c45..81ee4e64 100644 --- a/src/service/axios.js +++ b/src/service/axios.js @@ -4,7 +4,7 @@ import { CSRF_COOKIE_NAME, CSRF_HEADER_KEY } from '../constants/authConstants'; const Axios = axios.create({ baseURL: `/petition/api/`, - timeout: 20 * 1000, + timeout: 5 * 1000, withCredentials: true, // allow setting/passing cookies xsrfCookieName: CSRF_COOKIE_NAME, xsrfHeaderName: CSRF_HEADER_KEY,