summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSanto Cariotti <santo@dcariotti.me>2022-10-15 09:33:42 +0200
committerSanto Cariotti <santo@dcariotti.me>2022-10-15 09:33:42 +0200
commitd88a7fbd098413e97a9edcb1fac5f917f53f1510 (patch)
tree64e90284394d8afa7e354d7c441bb0a6c56ca2bb
parent5d019a49ccec2709956729807848afd4529e5cf2 (diff)
Warning store paging
-rw-r--r--store/warnings.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/store/warnings.js b/store/warnings.js
index 1e8fe07..65f1c92 100644
--- a/store/warnings.js
+++ b/store/warnings.js
@@ -50,8 +50,10 @@ export const actions = {
commit("loadingStatus", true, { root: true });
let res = { status: 0, data: null };
let api = this.$config.api;
+ const page = payload.page ?? 0;
+ delete payload.page;
- await fetch(`${api}/v1/warnings/filter`, {
+ await fetch(`${api}/v1/warnings/filter?page=${page}`, {
method: "POST",
headers: {
"Content-Type": "application/json",
@@ -63,7 +65,7 @@ export const actions = {
res.status = response.status;
const data = await response.json();
if (res.status == 200) {
- commit("saveWarnings", { results: data.results });
+ commit("saveWarnings", data);
}
})
.catch((e) => {