Skip to content

Commit

Permalink
Change db queries to use post instead of get
Browse files Browse the repository at this point in the history
  • Loading branch information
akariv committed Feb 4, 2024
1 parent d3357e0 commit 5e850b3
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions projects/budgetkey/src/app/item/budgetkey-item.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,16 @@ export class BudgetKeyItemService {
}

getItemData(query: string, headersOrder: string[], formatters: any[], page = 0, pageSize?: number): Observable<object> {
let url = 'https://next.obudget.org/api/query?query=' + encodeURIComponent(query) + '&page=' + page;
const params: any = {
page
};
let url = 'https://next.obudget.org/api/query';
if (!!pageSize) {
url += '&page_size=' + pageSize;
params['page_size'] = pageSize;
}
return this.http.get(url)
const formData = new FormData();
formData.append('query', query);
return this.http.post(url, formData, {params})
.pipe(
map(
(res: any) => {
Expand Down

0 comments on commit 5e850b3

Please sign in to comment.