'use strict'

const Middleware = use('Middleware')

/*
|--------------------------------------------------------------------------
| Global Middleware
|--------------------------------------------------------------------------
|
| Global middleware are executed on every request and must be defined
| inside below array.
|
*/
const globalMiddleware = [
  'Adonis/Middleware/Cors',
  'Adonis/Middleware/BodyParser',
  //'App/Http/Middleware/Auth',
  'Adonis/Middleware/Shield',
  'Adonis/Middleware/Flash'
]

/*
|--------------------------------------------------------------------------
| Named Middleware
|--------------------------------------------------------------------------
|
| Named middleware are key/value pairs. Keys are later used on routes
| which binds middleware to specific routes.
|
*/
const namedMiddleware = {
  'auth' : 'App/Http/Middleware/Auth'
}

/*
|--------------------------------------------------------------------------
| Register Middleware
|--------------------------------------------------------------------------
|
| Here we finally register our defined middleware to Middleware provider.
|
*/
Middleware.global(globalMiddleware)
Middleware.named(namedMiddleware)

@@ -412,40 +412,8 @@
 r',%0A
-  //'App/Http/Middleware/Auth',%0A
   'A
@@ -795,19 +795,20 @@
 = %7B%0A  'a
-uth
+dmin
 ' : 'App
@@ -829,11 +829,20 @@
 re/A
-uth
+dministrator
 '%0A%7D%0A

add Administrator Middleware