diff options
Diffstat (limited to 'store/warnings.js')
-rw-r--r-- | store/warnings.js | 6 |
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) => { |