2020-02-01 20:51:45 +08:00
|
|
|
<?php
|
|
|
|
namespace App\Http\Routes;
|
|
|
|
|
|
|
|
use Illuminate\Contracts\Routing\Registrar;
|
|
|
|
|
|
|
|
class AdminRoute
|
|
|
|
{
|
|
|
|
public function map(Registrar $router)
|
|
|
|
{
|
|
|
|
$router->group([
|
|
|
|
'prefix' => 'admin',
|
|
|
|
'middleware' => 'admin'
|
|
|
|
], function ($router) {
|
|
|
|
// Config
|
2020-02-01 21:54:08 +08:00
|
|
|
$router->get ('/config/fetch', 'Admin\\ConfigController@fetch');
|
2020-02-01 20:58:36 +08:00
|
|
|
$router->post('/config/save', 'Admin\\ConfigController@save');
|
2020-03-18 17:33:58 +08:00
|
|
|
$router->get ('/config/getEmailTemplate', 'Admin\\ConfigController@getEmailTemplate');
|
2020-05-17 16:01:48 +08:00
|
|
|
$router->post('/config/setTelegramWebhook', 'Admin\\ConfigController@setTelegramWebhook');
|
2020-02-01 20:51:45 +08:00
|
|
|
// Plan
|
2020-02-01 21:54:08 +08:00
|
|
|
$router->get ('/plan/fetch', 'Admin\\PlanController@fetch');
|
2020-02-01 20:58:36 +08:00
|
|
|
$router->post('/plan/save', 'Admin\\PlanController@save');
|
|
|
|
$router->post('/plan/drop', 'Admin\\PlanController@drop');
|
|
|
|
$router->post('/plan/update', 'Admin\\PlanController@update');
|
2020-04-20 16:07:06 +08:00
|
|
|
$router->post('/plan/sort', 'Admin\\PlanController@sort');
|
2020-02-01 20:51:45 +08:00
|
|
|
// Server
|
2020-06-18 20:25:53 +08:00
|
|
|
$router->get ('/server/group/fetch', 'Admin\\Server\\GroupController@fetch');
|
|
|
|
$router->post('/server/group/save', 'Admin\\Server\\GroupController@save');
|
|
|
|
$router->post('/server/group/drop', 'Admin\\Server\\GroupController@drop');
|
2020-06-11 20:47:02 +08:00
|
|
|
$router->group([
|
|
|
|
'prefix' => 'server/trojan'
|
|
|
|
], function ($router) {
|
|
|
|
$router->get ('fetch', 'Admin\\Server\\TrojanController@fetch');
|
|
|
|
$router->post('save', 'Admin\\Server\\TrojanController@save');
|
|
|
|
$router->post('drop', 'Admin\\Server\\TrojanController@drop');
|
|
|
|
$router->post('update', 'Admin\\Server\\TrojanController@update');
|
|
|
|
$router->post('copy', 'Admin\\Server\\TrojanController@copy');
|
|
|
|
$router->post('sort', 'Admin\\Server\\TrojanController@sort');
|
2020-07-02 21:41:14 +08:00
|
|
|
$router->post('viewConfig', 'Admin\\Server\\TrojanController@viewConfig');
|
2020-06-11 20:47:02 +08:00
|
|
|
});
|
|
|
|
$router->group([
|
|
|
|
'prefix' => 'server/v2ray'
|
|
|
|
], function ($router) {
|
|
|
|
$router->get ('fetch', 'Admin\\Server\\V2rayController@fetch');
|
|
|
|
$router->post('save', 'Admin\\Server\\V2rayController@save');
|
|
|
|
$router->post('drop', 'Admin\\Server\\V2rayController@drop');
|
|
|
|
$router->post('update', 'Admin\\Server\\V2rayController@update');
|
|
|
|
$router->post('copy', 'Admin\\Server\\V2rayController@copy');
|
|
|
|
$router->post('sort', 'Admin\\Server\\V2rayController@sort');
|
|
|
|
$router->post('viewConfig', 'Admin\\Server\\V2rayController@viewConfig');
|
|
|
|
});
|
2020-02-01 20:51:45 +08:00
|
|
|
// Order
|
2020-02-01 21:54:08 +08:00
|
|
|
$router->get ('/order/fetch', 'Admin\\OrderController@fetch');
|
2020-02-01 20:58:36 +08:00
|
|
|
$router->post('/order/repair', 'Admin\\OrderController@repair');
|
|
|
|
$router->post('/order/update', 'Admin\\OrderController@update');
|
2020-05-11 02:13:20 +08:00
|
|
|
$router->post('/order/assign', 'Admin\\OrderController@assign');
|
2020-02-01 20:51:45 +08:00
|
|
|
// User
|
2020-02-01 21:54:08 +08:00
|
|
|
$router->get ('/user/fetch', 'Admin\\UserController@fetch');
|
2020-02-01 20:58:36 +08:00
|
|
|
$router->post('/user/update', 'Admin\\UserController@update');
|
2020-02-03 02:47:29 +08:00
|
|
|
$router->get ('/user/getUserInfoById', 'Admin\\UserController@getUserInfoById');
|
2020-02-01 20:51:45 +08:00
|
|
|
// Stat
|
2020-02-01 21:54:08 +08:00
|
|
|
$router->get ('/stat/getOverride', 'Admin\\StatController@getOverride');
|
2020-02-01 20:51:45 +08:00
|
|
|
// Notice
|
2020-02-01 21:54:08 +08:00
|
|
|
$router->get ('/notice/fetch', 'Admin\\NoticeController@fetch');
|
2020-02-01 20:58:36 +08:00
|
|
|
$router->post('/notice/save', 'Admin\\NoticeController@save');
|
|
|
|
$router->post('/notice/update', 'Admin\\NoticeController@update');
|
|
|
|
$router->post('/notice/drop', 'Admin\\NoticeController@drop');
|
2020-02-01 20:51:45 +08:00
|
|
|
// Ticket
|
2020-02-01 21:54:08 +08:00
|
|
|
$router->get ('/ticket/fetch', 'Admin\\TicketController@fetch');
|
2020-02-01 20:58:36 +08:00
|
|
|
$router->post('/ticket/reply', 'Admin\\TicketController@reply');
|
|
|
|
$router->post('/ticket/close', 'Admin\\TicketController@close');
|
2020-02-01 20:51:45 +08:00
|
|
|
// Mail
|
2020-02-01 20:58:36 +08:00
|
|
|
$router->post('/mail/send', 'Admin\\MailController@send');
|
2020-02-01 20:51:45 +08:00
|
|
|
// Coupon
|
2020-02-01 21:54:08 +08:00
|
|
|
$router->get ('/coupon/fetch', 'Admin\\CouponController@fetch');
|
2020-02-01 20:58:36 +08:00
|
|
|
$router->post('/coupon/save', 'Admin\\CouponController@save');
|
|
|
|
$router->post('/coupon/drop', 'Admin\\CouponController@drop');
|
2020-02-01 20:51:45 +08:00
|
|
|
// Tutorial
|
2020-02-01 21:54:08 +08:00
|
|
|
$router->get ('/tutorial/fetch', 'Admin\\TutorialController@fetch');
|
2020-02-01 20:58:36 +08:00
|
|
|
$router->post('/tutorial/save', 'Admin\\TutorialController@save');
|
|
|
|
$router->post('/tutorial/show', 'Admin\\TutorialController@show');
|
|
|
|
$router->post('/tutorial/drop', 'Admin\\TutorialController@drop');
|
2020-04-16 23:01:18 +08:00
|
|
|
$router->post('/tutorial/sort', 'Admin\\TutorialController@sort');
|
2020-02-01 20:51:45 +08:00
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|