fix: Requests using GET that should be POST, related #4042
This commit is contained in:
@@ -216,7 +216,7 @@ export default class Collection extends ParanoidModel {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export = () => {
|
export = () => {
|
||||||
return client.get("/collections.export", {
|
return client.post("/collections.export", {
|
||||||
id: this.id,
|
id: this.id,
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -381,7 +381,7 @@ export default class DocumentsStore extends BaseStore<Document> {
|
|||||||
|
|
||||||
@action
|
@action
|
||||||
searchTitles = async (query: string) => {
|
searchTitles = async (query: string) => {
|
||||||
const res = await client.get("/documents.search_titles", {
|
const res = await client.post("/documents.search_titles", {
|
||||||
query,
|
query,
|
||||||
});
|
});
|
||||||
invariant(res?.data, "Search response should be available");
|
invariant(res?.data, "Search response should be available");
|
||||||
@@ -397,7 +397,7 @@ export default class DocumentsStore extends BaseStore<Document> {
|
|||||||
options: SearchParams
|
options: SearchParams
|
||||||
): Promise<SearchResult[]> => {
|
): Promise<SearchResult[]> => {
|
||||||
const compactedOptions = omitBy(options, (o) => !o);
|
const compactedOptions = omitBy(options, (o) => !o);
|
||||||
const res = await client.get("/documents.search", {
|
const res = await client.post("/documents.search", {
|
||||||
...compactedOptions,
|
...compactedOptions,
|
||||||
query,
|
query,
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user