Update routes
This commit is contained in:
+1
-23
@@ -25,27 +25,6 @@ class Kernel extends HttpKernel
|
||||
'Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode',
|
||||
];
|
||||
|
||||
/**
|
||||
* The application's route middleware groups.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $middlewareGroups = [
|
||||
'web' => [
|
||||
'Illuminate\Cookie\Middleware\EncryptCookies',
|
||||
'Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse',
|
||||
'Illuminate\Session\Middleware\StartSession',
|
||||
'Illuminate\View\Middleware\ShareErrorsFromSession',
|
||||
\Illuminate\Routing\Middleware\SubstituteBindings::class,
|
||||
'Illuminate\Foundation\Http\Middleware\VerifyCsrfToken',
|
||||
],
|
||||
'api' => [
|
||||
'Barryvdh\Cors\HandleCors',
|
||||
'CachetHQ\Cachet\Http\Middleware\Acceptable',
|
||||
'CachetHQ\Cachet\Http\Middleware\Timezone',
|
||||
],
|
||||
];
|
||||
|
||||
/**
|
||||
* The application's route middleware.
|
||||
*
|
||||
@@ -53,8 +32,7 @@ class Kernel extends HttpKernel
|
||||
*/
|
||||
protected $routeMiddleware = [
|
||||
'admin' => 'CachetHQ\Cachet\Http\Middleware\Admin',
|
||||
'bindings' => \Illuminate\Routing\Middleware\SubstituteBindings::class,
|
||||
'can' => \Illuminate\Auth\Middleware\Authorize::class,
|
||||
'can' => 'Illuminate\Auth\Middleware\Authorize',
|
||||
'auth.api' => 'CachetHQ\Cachet\Http\Middleware\ApiAuthentication',
|
||||
'guest' => 'CachetHQ\Cachet\Http\Middleware\RedirectIfAuthenticated',
|
||||
'localize' => 'CachetHQ\Cachet\Http\Middleware\Localize',
|
||||
|
||||
@@ -20,6 +20,13 @@ use Illuminate\Contracts\Routing\Registrar;
|
||||
*/
|
||||
class ApiRoutes
|
||||
{
|
||||
/**
|
||||
* Defines if these routes are for the browser.
|
||||
*
|
||||
* @var bool
|
||||
*/
|
||||
public static $browser = false;
|
||||
|
||||
/**
|
||||
* Define the api routes.
|
||||
*
|
||||
@@ -32,7 +39,6 @@ class ApiRoutes
|
||||
$router->group([
|
||||
'namespace' => 'Api',
|
||||
'prefix' => 'api/v1',
|
||||
'middleware' => ['api'],
|
||||
], function (Registrar $router) {
|
||||
$router->group(['middleware' => ['auth.api']], function (Registrar $router) {
|
||||
$router->get('ping', 'GeneralController@ping');
|
||||
|
||||
@@ -20,6 +20,13 @@ use Illuminate\Contracts\Routing\Registrar;
|
||||
*/
|
||||
class AuthRoutes
|
||||
{
|
||||
/**
|
||||
* Defines if these routes are for the browser.
|
||||
*
|
||||
* @var bool
|
||||
*/
|
||||
public static $browser = true;
|
||||
|
||||
/**
|
||||
* Define the auth routes.
|
||||
*
|
||||
@@ -30,7 +37,7 @@ class AuthRoutes
|
||||
public function map(Registrar $router)
|
||||
{
|
||||
$router->group([
|
||||
'middleware' => ['web', 'ready'],
|
||||
'middleware' => ['ready'],
|
||||
'prefix' => 'auth',
|
||||
], function (Registrar $router) {
|
||||
$router->get('login', [
|
||||
|
||||
@@ -21,6 +21,13 @@ use Illuminate\Contracts\Routing\Registrar;
|
||||
*/
|
||||
class ApiRoutes
|
||||
{
|
||||
/**
|
||||
* Defines if these routes are for the browser.
|
||||
*
|
||||
* @var bool
|
||||
*/
|
||||
public static $browser = true;
|
||||
|
||||
/**
|
||||
* Define the dashboard api routes.
|
||||
*
|
||||
@@ -31,7 +38,7 @@ class ApiRoutes
|
||||
public function map(Registrar $router)
|
||||
{
|
||||
$router->group([
|
||||
'middleware' => ['web', 'auth'],
|
||||
'middleware' => ['auth'],
|
||||
'namespace' => 'Dashboard',
|
||||
'prefix' => 'dashboard/api',
|
||||
], function (Registrar $router) {
|
||||
|
||||
@@ -21,6 +21,13 @@ use Illuminate\Contracts\Routing\Registrar;
|
||||
*/
|
||||
class BaseRoutes
|
||||
{
|
||||
/**
|
||||
* Defines if these routes are for the browser.
|
||||
*
|
||||
* @var bool
|
||||
*/
|
||||
public static $browser = true;
|
||||
|
||||
/**
|
||||
* Define the dashboard base routes.
|
||||
*
|
||||
@@ -31,7 +38,7 @@ class BaseRoutes
|
||||
public function map(Registrar $router)
|
||||
{
|
||||
$router->group([
|
||||
'middleware' => ['web', 'auth'],
|
||||
'middleware' => ['auth'],
|
||||
'namespace' => 'Dashboard',
|
||||
], function (Registrar $router) {
|
||||
$router->get('admin', 'DashboardController@redirectAdmin');
|
||||
|
||||
@@ -21,6 +21,13 @@ use Illuminate\Contracts\Routing\Registrar;
|
||||
*/
|
||||
class ComponentRoutes
|
||||
{
|
||||
/**
|
||||
* Defines if these routes are for the browser.
|
||||
*
|
||||
* @var bool
|
||||
*/
|
||||
public static $browser = true;
|
||||
|
||||
/**
|
||||
* Define the dashboard component routes.
|
||||
*
|
||||
@@ -31,7 +38,7 @@ class ComponentRoutes
|
||||
public function map(Registrar $router)
|
||||
{
|
||||
$router->group([
|
||||
'middleware' => ['web', 'auth'],
|
||||
'middleware' => ['auth'],
|
||||
'namespace' => 'Dashboard',
|
||||
'prefix' => 'dashboard/components',
|
||||
], function (Registrar $router) {
|
||||
|
||||
@@ -21,6 +21,13 @@ use Illuminate\Contracts\Routing\Registrar;
|
||||
*/
|
||||
class IncidentRoutes
|
||||
{
|
||||
/**
|
||||
* Defines if these routes are for the browser.
|
||||
*
|
||||
* @var bool
|
||||
*/
|
||||
public static $browser = true;
|
||||
|
||||
/**
|
||||
* Define the dashboard incident routes.
|
||||
*
|
||||
@@ -31,7 +38,7 @@ class IncidentRoutes
|
||||
public function map(Registrar $router)
|
||||
{
|
||||
$router->group([
|
||||
'middleware' => ['web', 'auth'],
|
||||
'middleware' => ['auth'],
|
||||
'namespace' => 'Dashboard',
|
||||
'prefix' => 'dashboard/incidents',
|
||||
], function (Registrar $router) {
|
||||
|
||||
@@ -21,6 +21,13 @@ use Illuminate\Contracts\Routing\Registrar;
|
||||
*/
|
||||
class MetricRoutes
|
||||
{
|
||||
/**
|
||||
* Defines if these routes are for the browser.
|
||||
*
|
||||
* @var bool
|
||||
*/
|
||||
public static $browser = true;
|
||||
|
||||
/**
|
||||
* Define the dashboard metric routes.
|
||||
*
|
||||
@@ -31,7 +38,7 @@ class MetricRoutes
|
||||
public function map(Registrar $router)
|
||||
{
|
||||
$router->group([
|
||||
'middleware' => ['web', 'auth'],
|
||||
'middleware' => ['auth'],
|
||||
'namespace' => 'Dashboard',
|
||||
'prefix' => 'dashboard/metrics',
|
||||
], function (Registrar $router) {
|
||||
|
||||
@@ -21,6 +21,13 @@ use Illuminate\Contracts\Routing\Registrar;
|
||||
*/
|
||||
class ScheduleRoutes
|
||||
{
|
||||
/**
|
||||
* Defines if these routes are for the browser.
|
||||
*
|
||||
* @var bool
|
||||
*/
|
||||
public static $browser = true;
|
||||
|
||||
/**
|
||||
* Define the dashboard schedule routes.
|
||||
*
|
||||
@@ -31,7 +38,7 @@ class ScheduleRoutes
|
||||
public function map(Registrar $router)
|
||||
{
|
||||
$router->group([
|
||||
'middleware' => ['web', 'auth'],
|
||||
'middleware' => ['auth'],
|
||||
'namespace' => 'Dashboard',
|
||||
'prefix' => 'dashboard/schedule',
|
||||
], function (Registrar $router) {
|
||||
|
||||
@@ -21,6 +21,13 @@ use Illuminate\Contracts\Routing\Registrar;
|
||||
*/
|
||||
class SettingRoutes
|
||||
{
|
||||
/**
|
||||
* Defines if these routes are for the browser.
|
||||
*
|
||||
* @var bool
|
||||
*/
|
||||
public static $browser = true;
|
||||
|
||||
/**
|
||||
* Define the dashboard setting routes.
|
||||
*
|
||||
@@ -31,7 +38,7 @@ class SettingRoutes
|
||||
public function map(Registrar $router)
|
||||
{
|
||||
$router->group([
|
||||
'middleware' => ['web', 'auth'],
|
||||
'middleware' => ['auth'],
|
||||
'namespace' => 'Dashboard',
|
||||
'prefix' => 'dashboard/settings',
|
||||
], function (Registrar $router) {
|
||||
|
||||
@@ -21,6 +21,13 @@ use Illuminate\Contracts\Routing\Registrar;
|
||||
*/
|
||||
class SubscriberRoutes
|
||||
{
|
||||
/**
|
||||
* Defines if these routes are for the browser.
|
||||
*
|
||||
* @var bool
|
||||
*/
|
||||
public static $browser = true;
|
||||
|
||||
/**
|
||||
* Define the dashboard subscriber routes.
|
||||
*
|
||||
@@ -31,7 +38,7 @@ class SubscriberRoutes
|
||||
public function map(Registrar $router)
|
||||
{
|
||||
$router->group([
|
||||
'middleware' => ['web', 'auth'],
|
||||
'middleware' => ['auth'],
|
||||
'namespace' => 'Dashboard',
|
||||
'prefix' => 'dashboard/subscribers',
|
||||
], function (Registrar $router) {
|
||||
|
||||
@@ -21,6 +21,13 @@ use Illuminate\Contracts\Routing\Registrar;
|
||||
*/
|
||||
class TeamRoutes
|
||||
{
|
||||
/**
|
||||
* Defines if these routes are for the browser.
|
||||
*
|
||||
* @var bool
|
||||
*/
|
||||
public static $browser = true;
|
||||
|
||||
/**
|
||||
* Define the dashboard team routes.
|
||||
*
|
||||
@@ -31,7 +38,7 @@ class TeamRoutes
|
||||
public function map(Registrar $router)
|
||||
{
|
||||
$router->group([
|
||||
'middleware' => ['web', 'auth'],
|
||||
'middleware' => ['auth'],
|
||||
'namespace' => 'Dashboard',
|
||||
'prefix' => 'dashboard/team',
|
||||
], function (Registrar $router) {
|
||||
|
||||
@@ -21,6 +21,13 @@ use Illuminate\Contracts\Routing\Registrar;
|
||||
*/
|
||||
class TemplateRoutes
|
||||
{
|
||||
/**
|
||||
* Defines if these routes are for the browser.
|
||||
*
|
||||
* @var bool
|
||||
*/
|
||||
public static $browser = true;
|
||||
|
||||
/**
|
||||
* Define the dashboard template routes.
|
||||
*
|
||||
@@ -31,7 +38,7 @@ class TemplateRoutes
|
||||
public function map(Registrar $router)
|
||||
{
|
||||
$router->group([
|
||||
'middleware' => ['web', 'auth'],
|
||||
'middleware' => ['auth'],
|
||||
'namespace' => 'Dashboard',
|
||||
'prefix' => 'dashboard/templates',
|
||||
], function (Registrar $router) {
|
||||
|
||||
@@ -21,6 +21,13 @@ use Illuminate\Contracts\Routing\Registrar;
|
||||
*/
|
||||
class UserRoutes
|
||||
{
|
||||
/**
|
||||
* Defines if these routes are for the browser.
|
||||
*
|
||||
* @var bool
|
||||
*/
|
||||
public static $browser = true;
|
||||
|
||||
/**
|
||||
* Define the dashboard user routes.
|
||||
*
|
||||
@@ -31,7 +38,7 @@ class UserRoutes
|
||||
public function map(Registrar $router)
|
||||
{
|
||||
$router->group([
|
||||
'middleware' => ['web', 'auth'],
|
||||
'middleware' => ['auth'],
|
||||
'namespace' => 'Dashboard',
|
||||
'prefix' => 'dashboard/user',
|
||||
], function (Registrar $router) {
|
||||
|
||||
@@ -20,6 +20,13 @@ use Illuminate\Contracts\Routing\Registrar;
|
||||
*/
|
||||
class FeedRoutes
|
||||
{
|
||||
/**
|
||||
* Defines if these routes are for the browser.
|
||||
*
|
||||
* @var bool
|
||||
*/
|
||||
public static $browser = true;
|
||||
|
||||
/**
|
||||
* Define the status page routes.
|
||||
*
|
||||
@@ -30,7 +37,7 @@ class FeedRoutes
|
||||
public function map(Registrar $router)
|
||||
{
|
||||
$router->group([
|
||||
'middleware' => ['web', 'ready'],
|
||||
'middleware' => ['ready'],
|
||||
], function (Registrar $router) {
|
||||
$router->get('/atom/{component_group?}', [
|
||||
'as' => 'get:feed.atom',
|
||||
|
||||
@@ -21,6 +21,13 @@ use Illuminate\Contracts\Routing\Registrar;
|
||||
*/
|
||||
class SetupRoutes
|
||||
{
|
||||
/**
|
||||
* Defines if these routes are for the browser.
|
||||
*
|
||||
* @var bool
|
||||
*/
|
||||
public static $browser = true;
|
||||
|
||||
/**
|
||||
* Define the setup routes.
|
||||
*
|
||||
@@ -31,7 +38,7 @@ class SetupRoutes
|
||||
public function map(Registrar $router)
|
||||
{
|
||||
$router->group([
|
||||
'middleware' => ['web', 'setup'],
|
||||
'middleware' => ['setup'],
|
||||
'prefix' => 'setup',
|
||||
], function (Registrar $router) {
|
||||
$router->get('/', [
|
||||
|
||||
@@ -20,6 +20,13 @@ use Illuminate\Contracts\Routing\Registrar;
|
||||
*/
|
||||
class SignupRoutes
|
||||
{
|
||||
/**
|
||||
* Defines if these routes are for the browser.
|
||||
*
|
||||
* @var bool
|
||||
*/
|
||||
public static $browser = true;
|
||||
|
||||
/**
|
||||
* Define the signup routes.
|
||||
*
|
||||
@@ -30,7 +37,7 @@ class SignupRoutes
|
||||
public function map(Registrar $router)
|
||||
{
|
||||
$router->group([
|
||||
'middleware' => ['web', 'ready', 'guest'],
|
||||
'middleware' => ['ready', 'guest'],
|
||||
'prefix' => 'signup',
|
||||
], function (Registrar $router) {
|
||||
$router->get('invite/{code}', [
|
||||
|
||||
@@ -20,6 +20,13 @@ use Illuminate\Contracts\Routing\Registrar;
|
||||
*/
|
||||
class StatusPageRoutes
|
||||
{
|
||||
/**
|
||||
* Defines if these routes are for the browser.
|
||||
*
|
||||
* @var bool
|
||||
*/
|
||||
public static $browser = true;
|
||||
|
||||
/**
|
||||
* Define the status page routes.
|
||||
*
|
||||
@@ -30,7 +37,7 @@ class StatusPageRoutes
|
||||
public function map(Registrar $router)
|
||||
{
|
||||
$router->group([
|
||||
'middleware' => ['web', 'ready', 'localize'],
|
||||
'middleware' => ['ready', 'localize'],
|
||||
], function (Registrar $router) {
|
||||
$router->get('/', [
|
||||
'as' => 'get:status-page',
|
||||
|
||||
@@ -20,6 +20,13 @@ use Illuminate\Contracts\Routing\Registrar;
|
||||
*/
|
||||
class SubscribeRoutes
|
||||
{
|
||||
/**
|
||||
* Defines if these routes are for the browser.
|
||||
*
|
||||
* @var bool
|
||||
*/
|
||||
public static $browser = true;
|
||||
|
||||
/**
|
||||
* Define the subscribe routes.
|
||||
*
|
||||
@@ -30,7 +37,7 @@ class SubscribeRoutes
|
||||
public function map(Registrar $router)
|
||||
{
|
||||
$router->group([
|
||||
'middleware' => ['web', 'ready', 'localize', 'subscribers'],
|
||||
'middleware' => ['ready', 'localize', 'subscribers'],
|
||||
], function (Registrar $router) {
|
||||
$router->get('subscribe', [
|
||||
'as' => 'get:subscribe',
|
||||
|
||||
Reference in New Issue
Block a user