Completed
Push — master ( fc044c...dc5ba9 )
by Robin
15:29
created
core/routes.php 1 patch
Indentation   +64 added lines, -64 removed lines patch added patch discarded remove patch
@@ -35,35 +35,35 @@  discard block
 block discarded – undo
35 35
 
36 36
 $application = new Application();
37 37
 $application->registerRoutes($this, [
38
-	'routes' => [
39
-		['name' => 'lost#email', 'url' => '/lostpassword/email', 'verb' => 'POST'],
40
-		['name' => 'lost#resetform', 'url' => '/lostpassword/reset/form/{token}/{userId}', 'verb' => 'GET'],
41
-		['name' => 'lost#setPassword', 'url' => '/lostpassword/set/{token}/{userId}', 'verb' => 'POST'],
42
-		['name' => 'user#getDisplayNames', 'url' => '/displaynames', 'verb' => 'POST'],
43
-		['name' => 'avatar#getAvatar', 'url' => '/avatar/{userId}/{size}', 'verb' => 'GET'],
44
-		['name' => 'avatar#deleteAvatar', 'url' => '/avatar/', 'verb' => 'DELETE'],
45
-		['name' => 'avatar#postCroppedAvatar', 'url' => '/avatar/cropped', 'verb' => 'POST'],
46
-		['name' => 'avatar#getTmpAvatar', 'url' => '/avatar/tmp', 'verb' => 'GET'],
47
-		['name' => 'avatar#postAvatar', 'url' => '/avatar/', 'verb' => 'POST'],
48
-		['name' => 'login#tryLogin', 'url' => '/login', 'verb' => 'POST'],
49
-		['name' => 'login#confirmPassword', 'url' => '/login/confirm', 'verb' => 'POST'],
50
-		['name' => 'login#showLoginForm', 'url' => '/login', 'verb' => 'GET'],
51
-		['name' => 'login#logout', 'url' => '/logout', 'verb' => 'GET'],
52
-		['name' => 'TwoFactorChallenge#selectChallenge', 'url' => '/login/selectchallenge', 'verb' => 'GET'],
53
-		['name' => 'TwoFactorChallenge#showChallenge', 'url' => '/login/challenge/{challengeProviderId}', 'verb' => 'GET'],
54
-		['name' => 'TwoFactorChallenge#solveChallenge', 'url' => '/login/challenge/{challengeProviderId}', 'verb' => 'POST'],
55
-		['name' => 'OCJS#getConfig', 'url' => '/core/js/oc.js', 'verb' => 'GET'],
56
-		['name' => 'Preview#getPreview', 'url' => '/core/preview', 'verb' => 'GET'],
57
-		['name' => 'Preview#getPreview', 'url' => '/core/preview.png', 'verb' => 'GET'],
58
-		['name' => 'Css#getCss', 'url' => '/css/{appName}/{fileName}', 'verb' => 'GET'],
59
-		['name' => 'Js#getJs', 'url' => '/js/{appName}/{fileName}', 'verb' => 'GET'],
60
-	],
61
-	'ocs' => [
62
-		['root' => '/cloud', 'name' => 'OCS#getCapabilities', 'url' => '/capabilities', 'verb' => 'GET'],
63
-		['root' => '', 'name' => 'OCS#getConfig', 'url' => '/config', 'verb' => 'GET'],
64
-		['root' => '/person', 'name' => 'OCS#personCheck', 'url' => '/check', 'verb' => 'POST'],
65
-		['root' => '/identityproof', 'name' => 'OCS#getIdentityProof', 'url' => '/key/{cloudId}', 'verb' => 'GET'],
66
-	],
38
+    'routes' => [
39
+        ['name' => 'lost#email', 'url' => '/lostpassword/email', 'verb' => 'POST'],
40
+        ['name' => 'lost#resetform', 'url' => '/lostpassword/reset/form/{token}/{userId}', 'verb' => 'GET'],
41
+        ['name' => 'lost#setPassword', 'url' => '/lostpassword/set/{token}/{userId}', 'verb' => 'POST'],
42
+        ['name' => 'user#getDisplayNames', 'url' => '/displaynames', 'verb' => 'POST'],
43
+        ['name' => 'avatar#getAvatar', 'url' => '/avatar/{userId}/{size}', 'verb' => 'GET'],
44
+        ['name' => 'avatar#deleteAvatar', 'url' => '/avatar/', 'verb' => 'DELETE'],
45
+        ['name' => 'avatar#postCroppedAvatar', 'url' => '/avatar/cropped', 'verb' => 'POST'],
46
+        ['name' => 'avatar#getTmpAvatar', 'url' => '/avatar/tmp', 'verb' => 'GET'],
47
+        ['name' => 'avatar#postAvatar', 'url' => '/avatar/', 'verb' => 'POST'],
48
+        ['name' => 'login#tryLogin', 'url' => '/login', 'verb' => 'POST'],
49
+        ['name' => 'login#confirmPassword', 'url' => '/login/confirm', 'verb' => 'POST'],
50
+        ['name' => 'login#showLoginForm', 'url' => '/login', 'verb' => 'GET'],
51
+        ['name' => 'login#logout', 'url' => '/logout', 'verb' => 'GET'],
52
+        ['name' => 'TwoFactorChallenge#selectChallenge', 'url' => '/login/selectchallenge', 'verb' => 'GET'],
53
+        ['name' => 'TwoFactorChallenge#showChallenge', 'url' => '/login/challenge/{challengeProviderId}', 'verb' => 'GET'],
54
+        ['name' => 'TwoFactorChallenge#solveChallenge', 'url' => '/login/challenge/{challengeProviderId}', 'verb' => 'POST'],
55
+        ['name' => 'OCJS#getConfig', 'url' => '/core/js/oc.js', 'verb' => 'GET'],
56
+        ['name' => 'Preview#getPreview', 'url' => '/core/preview', 'verb' => 'GET'],
57
+        ['name' => 'Preview#getPreview', 'url' => '/core/preview.png', 'verb' => 'GET'],
58
+        ['name' => 'Css#getCss', 'url' => '/css/{appName}/{fileName}', 'verb' => 'GET'],
59
+        ['name' => 'Js#getJs', 'url' => '/js/{appName}/{fileName}', 'verb' => 'GET'],
60
+    ],
61
+    'ocs' => [
62
+        ['root' => '/cloud', 'name' => 'OCS#getCapabilities', 'url' => '/capabilities', 'verb' => 'GET'],
63
+        ['root' => '', 'name' => 'OCS#getConfig', 'url' => '/config', 'verb' => 'GET'],
64
+        ['root' => '/person', 'name' => 'OCS#personCheck', 'url' => '/check', 'verb' => 'POST'],
65
+        ['root' => '/identityproof', 'name' => 'OCS#getIdentityProof', 'url' => '/key/{cloudId}', 'verb' => 'GET'],
66
+    ],
67 67
 ]);
68 68
 
69 69
 // Post installation check
@@ -72,62 +72,62 @@  discard block
 block discarded – undo
72 72
 // Core ajax actions
73 73
 // Search
74 74
 $this->create('search_ajax_search', '/core/search')
75
-	->actionInclude('core/search/ajax/search.php');
75
+    ->actionInclude('core/search/ajax/search.php');
76 76
 // Routing
77 77
 $this->create('core_ajax_update', '/core/ajax/update.php')
78
-	->actionInclude('core/ajax/update.php');
78
+    ->actionInclude('core/ajax/update.php');
79 79
 
80 80
 // File routes
81 81
 $this->create('files.viewcontroller.showFile', '/f/{fileid}')->action(function($urlParams) {
82
-	$app = new \OCA\Files\AppInfo\Application($urlParams);
83
-	$app->dispatch('ViewController', 'index');
82
+    $app = new \OCA\Files\AppInfo\Application($urlParams);
83
+    $app->dispatch('ViewController', 'index');
84 84
 });
85 85
 
86 86
 // Call routes
87 87
 $this->create('spreed.pagecontroller.showCall', '/call/{token}')->action(function($urlParams) {
88
-	if (class_exists(\OCA\Spreed\AppInfo\Application::class, false)) {
89
-		$app = new \OCA\Spreed\AppInfo\Application($urlParams);
90
-		$app->dispatch('PageController', 'index');
91
-	} else {
92
-		throw new \OC\HintException('App spreed is not enabled');
93
-	}
88
+    if (class_exists(\OCA\Spreed\AppInfo\Application::class, false)) {
89
+        $app = new \OCA\Spreed\AppInfo\Application($urlParams);
90
+        $app->dispatch('PageController', 'index');
91
+    } else {
92
+        throw new \OC\HintException('App spreed is not enabled');
93
+    }
94 94
 });
95 95
 
96 96
 // Sharing routes
97 97
 $this->create('files_sharing.sharecontroller.showShare', '/s/{token}')->action(function($urlParams) {
98
-	if (class_exists(\OCA\Files_Sharing\AppInfo\Application::class, false)) {
99
-		$app = new \OCA\Files_Sharing\AppInfo\Application($urlParams);
100
-		$app->dispatch('ShareController', 'showShare');
101
-	} else {
102
-		throw new \OC\HintException('App file sharing is not enabled');
103
-	}
98
+    if (class_exists(\OCA\Files_Sharing\AppInfo\Application::class, false)) {
99
+        $app = new \OCA\Files_Sharing\AppInfo\Application($urlParams);
100
+        $app->dispatch('ShareController', 'showShare');
101
+    } else {
102
+        throw new \OC\HintException('App file sharing is not enabled');
103
+    }
104 104
 });
105 105
 $this->create('files_sharing.sharecontroller.authenticate', '/s/{token}/authenticate')->post()->action(function($urlParams) {
106
-	if (class_exists(\OCA\Files_Sharing\AppInfo\Application::class, false)) {
107
-		$app = new \OCA\Files_Sharing\AppInfo\Application($urlParams);
108
-		$app->dispatch('ShareController', 'authenticate');
109
-	} else {
110
-		throw new \OC\HintException('App file sharing is not enabled');
111
-	}
106
+    if (class_exists(\OCA\Files_Sharing\AppInfo\Application::class, false)) {
107
+        $app = new \OCA\Files_Sharing\AppInfo\Application($urlParams);
108
+        $app->dispatch('ShareController', 'authenticate');
109
+    } else {
110
+        throw new \OC\HintException('App file sharing is not enabled');
111
+    }
112 112
 });
113 113
 $this->create('files_sharing.sharecontroller.showAuthenticate', '/s/{token}/authenticate')->get()->action(function($urlParams) {
114
-	if (class_exists(\OCA\Files_Sharing\AppInfo\Application::class, false)) {
115
-		$app = new \OCA\Files_Sharing\AppInfo\Application($urlParams);
116
-		$app->dispatch('ShareController', 'showAuthenticate');
117
-	} else {
118
-		throw new \OC\HintException('App file sharing is not enabled');
119
-	}
114
+    if (class_exists(\OCA\Files_Sharing\AppInfo\Application::class, false)) {
115
+        $app = new \OCA\Files_Sharing\AppInfo\Application($urlParams);
116
+        $app->dispatch('ShareController', 'showAuthenticate');
117
+    } else {
118
+        throw new \OC\HintException('App file sharing is not enabled');
119
+    }
120 120
 });
121 121
 $this->create('files_sharing.sharecontroller.downloadShare', '/s/{token}/download')->get()->action(function($urlParams) {
122
-	if (class_exists(\OCA\Files_Sharing\AppInfo\Application::class, false)) {
123
-		$app = new \OCA\Files_Sharing\AppInfo\Application($urlParams);
124
-		$app->dispatch('ShareController', 'downloadShare');
125
-	} else {
126
-		throw new \OC\HintException('App file sharing is not enabled');
127
-	}
122
+    if (class_exists(\OCA\Files_Sharing\AppInfo\Application::class, false)) {
123
+        $app = new \OCA\Files_Sharing\AppInfo\Application($urlParams);
124
+        $app->dispatch('ShareController', 'downloadShare');
125
+    } else {
126
+        throw new \OC\HintException('App file sharing is not enabled');
127
+    }
128 128
 });
129 129
 
130 130
 // used for heartbeat
131 131
 $this->create('heartbeat', '/heartbeat')->action(function(){
132
-	// do nothing
132
+    // do nothing
133 133
 });
Please login to merge, or discard this patch.