2020-09-30 20:57:12 +02:00
|
|
|
import axios from 'axios';
|
|
|
|
|
|
|
|
export const state = () => ({
|
|
|
|
logs: []
|
|
|
|
});
|
|
|
|
|
|
|
|
export const mutations = {
|
|
|
|
update(state, data) {
|
|
|
|
state.logs = data;
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
export const actions = {
|
2020-10-02 18:09:51 +02:00
|
|
|
update(context) {
|
2020-09-30 20:57:12 +02:00
|
|
|
axios.post("/api", {
|
|
|
|
request: "fetch_session_logs"
|
|
|
|
})
|
|
|
|
.then(function(response) {
|
|
|
|
if (response.data.status === "OK") {
|
2020-10-02 18:09:51 +02:00
|
|
|
context.commit("update", response.data.logs);
|
2020-09-30 20:57:12 +02:00
|
|
|
}
|
|
|
|
});
|
|
|
|
},
|
|
|
|
};
|