added batch delete schedules
@@ -26,14 +26,13 @@ const actions = {
getScheduleList({ state, commit }) {
request.get('/schedules')
.then(response => {
- if (response.data.data) {
+ if (!response.data.data) response.data.data = []
commit('SET_SCHEDULE_LIST', response.data.data.map(d => {
const arr = d.cron.split(' ')
arr.splice(0, 1)
d.cron = arr.join(' ')
return d
}))
- }
})
},
addSchedule({ state }) {
