mirror of
https://github.com/docmost/docmost.git
synced 2026-05-07 14:43:06 +08:00
fix(client): exempt base csv export from response interceptor unwrap
This commit is contained in:
@@ -10,7 +10,11 @@ const api: AxiosInstance = axios.create({
|
|||||||
api.interceptors.response.use(
|
api.interceptors.response.use(
|
||||||
(response) => {
|
(response) => {
|
||||||
// we need the response headers for these endpoints
|
// we need the response headers for these endpoints
|
||||||
const exemptEndpoints = ["/api/pages/export", "/api/spaces/export"];
|
const exemptEndpoints = [
|
||||||
|
"/api/pages/export",
|
||||||
|
"/api/spaces/export",
|
||||||
|
"/api/bases/export-csv",
|
||||||
|
];
|
||||||
if (response.request.responseURL) {
|
if (response.request.responseURL) {
|
||||||
const path = new URL(response.request.responseURL)?.pathname;
|
const path = new URL(response.request.responseURL)?.pathname;
|
||||||
if (path && exemptEndpoints.includes(path)) {
|
if (path && exemptEndpoints.includes(path)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user