Nuxt/test/fixtures/basic/pages/fn-midd.vue
pooya parsa e7cc2757c3 refactor: update eslint-config to 1.x
Co-authored-by: Alexander Lichter <manniL@gmx.net>
2019-07-10 15:15:49 +04:30

18 lines
310 B
Vue

<template>
<h1>Date: {{ date }}</h1>
</template>
<script>
let date
export default {
middleware: ({ query, error }) => {
if (!query.please) { return error({ message: 'You need to ask the permission', statusCode: 403 }) }
date = Date.now()
},
asyncData () {
return { date }
}
}
</script>