-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathroutes.php
38 lines (35 loc) · 1.13 KB
/
routes.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<?php
declare(strict_types=1);
/**
* This file is part of Slimxy.
*
* @link http://www.alonexy.com
* @document https://www.slimframework.com/
*/
$app->get('/', \Controller\IndexController::class . ':Index');
$app->group('/api', function () {
$this->get('/test', \Controller\TestController::class . ':Index');
$this->get('/kline_test', \Controller\TestController::class . ':kline_test');
$this->get('/addJob', \Controller\TestController::class . ':AddJob');
})->add(new \Tuupola\Middleware\Cors([
'origin' => ['*'],
'methods' => ['GET', 'POST', 'PUT', 'PATCH', 'DELETE'],
'headers.allow' => [],
'headers.expose' => [],
'credentials' => false,
'cache' => 0,
]));
$app->group('/api/v1', function () {
$this->get('/get_house', \Controller\HomeController::class . ':get_house');
})->add(new \Tuupola\Middleware\Cors([
'origin' => ['*'],
'methods' => ['GET', 'POST', 'PUT', 'PATCH', 'DELETE'],
'headers.allow' => [],
'headers.expose' => [],
'credentials' => false,
'cache' => 0,
]));
/*
* @name 任务执行路由 Cli
*/
$app->get('/resque_handle', \Jobs\Resque::class . ':Handle');