fix: Requests using GET that should be POST, related #4042

This commit is contained in:
Tom Moor
2022-09-02 10:45:20 +02:00
parent c85f3bd7b4
commit 0882a50cfd
2 changed files with 3 additions and 3 deletions

View File

@@ -216,7 +216,7 @@ export default class Collection extends ParanoidModel {
};
export = () => {
return client.get("/collections.export", {
return client.post("/collections.export", {
id: this.id,
});
};

View File

@@ -381,7 +381,7 @@ export default class DocumentsStore extends BaseStore<Document> {
@action
searchTitles = async (query: string) => {
const res = await client.get("/documents.search_titles", {
const res = await client.post("/documents.search_titles", {
query,
});
invariant(res?.data, "Search response should be available");
@@ -397,7 +397,7 @@ export default class DocumentsStore extends BaseStore<Document> {
options: SearchParams
): Promise<SearchResult[]> => {
const compactedOptions = omitBy(options, (o) => !o);
const res = await client.get("/documents.search", {
const res = await client.post("/documents.search", {
...compactedOptions,
query,
});