[refactoring] settings middleware

This commit is contained in:
les
2019-10-11 18:34:14 +02:00
parent 7f70eae363
commit aa63c3e7bd
12 changed files with 1218 additions and 952 deletions

View File

@@ -1,4 +1,4 @@
<template lang="pug">
<template lang='pug'>
#home
Nav
Home
@@ -11,7 +11,7 @@ import Nav from '~/components/Nav.vue'
export default {
name: 'Index',
async fetch ({ store, $axios }) {
try {
try {
const now = new Date()
const events = await $axios.$get(`/event/${now.getMonth()}/${now.getFullYear()}`)
store.commit('setEvents', events)