I've created a middleware for authentication on my nuxt application, and I want to call it inside a layout. Problem is, I'm calling it like this:
export default {
middleware: 'auth',
and it is returning me the following warning:
callback-based asyncData, fetch or middleware calls are deprecated. Please switch to promises or async/await syntax
I'm new into the front-end world and I searched but couldn't find/understand how to implement this async/await syntax on my middleware call. Can you help me? Thanks in advance.