mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-14 18:13:54 +00:00
e7cc2757c3
Co-authored-by: Alexander Lichter <manniL@gmx.net>
18 lines
310 B
Vue
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>
|