v2board/app/Http/Routes/AdminRoute.php

131 lines
8.3 KiB
PHP
Raw Normal View History

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([
2022-12-15 11:29:54 +08:00
'prefix' => config('v2board.secure_path', config('v2board.frontend_admin_path', hash('crc32b', config('app.key')))),
2020-02-01 20:51:45 +08:00
'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');
2021-07-29 01:41:31 +08:00
$router->get ('/config/getThemeTemplate', 'Admin\\ConfigController@getThemeTemplate');
2020-05-17 16:01:48 +08:00
$router->post('/config/setTelegramWebhook', 'Admin\\ConfigController@setTelegramWebhook');
2021-10-08 20:00:34 +08:00
$router->post('/config/testSendMail', 'Admin\\ConfigController@testSendMail');
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');
2022-11-27 15:11:10 +08:00
$router->get ('/server/route/fetch', 'Admin\\Server\\RouteController@fetch');
$router->post('/server/route/save', 'Admin\\Server\\RouteController@save');
$router->post('/server/route/drop', 'Admin\\Server\\RouteController@drop');
2020-11-14 17:26:17 +08:00
$router->get ('/server/manage/getNodes', 'Admin\\Server\\ManageController@getNodes');
$router->post('/server/manage/sort', 'Admin\\Server\\ManageController@sort');
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');
});
2020-10-04 14:21:09 +08:00
$router->group([
'prefix' => 'server/shadowsocks'
], function ($router) {
$router->get ('fetch', 'Admin\\Server\\ShadowsocksController@fetch');
$router->post('save', 'Admin\\Server\\ShadowsocksController@save');
$router->post('drop', 'Admin\\Server\\ShadowsocksController@drop');
$router->post('update', 'Admin\\Server\\ShadowsocksController@update');
$router->post('copy', 'Admin\\Server\\ShadowsocksController@copy');
$router->post('sort', 'Admin\\Server\\ShadowsocksController@sort');
});
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/update', 'Admin\\OrderController@update');
2020-05-11 02:13:20 +08:00
$router->post('/order/assign', 'Admin\\OrderController@assign');
2021-08-28 14:11:59 +08:00
$router->post('/order/paid', 'Admin\\OrderController@paid');
$router->post('/order/cancel', 'Admin\\OrderController@cancel');
$router->post('/order/detail', 'Admin\\OrderController@detail');
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-10-08 12:13:47 +08:00
$router->post('/user/generate', 'Admin\\UserController@generate');
2020-10-08 22:35:07 +08:00
$router->post('/user/dumpCSV', 'Admin\\UserController@dumpCSV');
2020-10-19 00:37:27 +08:00
$router->post('/user/sendMail', 'Admin\\UserController@sendMail');
2020-10-20 02:09:32 +08:00
$router->post('/user/ban', 'Admin\\UserController@ban');
2021-01-02 21:35:41 +08:00
$router->post('/user/resetSecret', 'Admin\\UserController@resetSecret');
2021-03-26 01:20:53 +08:00
$router->post('/user/setInviteUser', 'Admin\\UserController@setInviteUser');
2020-12-24 23:41:32 +08:00
// StatOrder
2020-02-01 21:54:08 +08:00
$router->get ('/stat/getOverride', 'Admin\\StatController@getOverride');
2020-12-24 23:41:32 +08:00
$router->get ('/stat/getServerLastRank', 'Admin\\StatController@getServerLastRank');
$router->get ('/stat/getOrder', 'Admin\\StatController@getOrder');
2022-08-21 17:18:24 +08:00
$router->get ('/stat/getStatUser', 'Admin\\StatController@getStatUser');
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');
2022-01-22 02:30:05 +08:00
$router->post('/notice/show', 'Admin\\NoticeController@show');
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
// Coupon
2020-02-01 21:54:08 +08:00
$router->get ('/coupon/fetch', 'Admin\\CouponController@fetch');
2020-10-24 23:08:14 +08:00
$router->post('/coupon/generate', 'Admin\\CouponController@generate');
2020-02-01 20:58:36 +08:00
$router->post('/coupon/drop', 'Admin\\CouponController@drop');
2022-01-22 02:30:05 +08:00
$router->post('/coupon/show', 'Admin\\CouponController@show');
// Knowledge
$router->get ('/knowledge/fetch', 'Admin\\KnowledgeController@fetch');
$router->get ('/knowledge/getCategory', 'Admin\\KnowledgeController@getCategory');
$router->post('/knowledge/save', 'Admin\\KnowledgeController@save');
$router->post('/knowledge/show', 'Admin\\KnowledgeController@show');
$router->post('/knowledge/drop', 'Admin\\KnowledgeController@drop');
$router->post('/knowledge/sort', 'Admin\\KnowledgeController@sort');
2021-04-28 16:56:08 +08:00
// Payment
$router->get ('/payment/fetch', 'Admin\\PaymentController@fetch');
$router->get ('/payment/getPaymentMethods', 'Admin\\PaymentController@getPaymentMethods');
$router->post('/payment/getPaymentForm', 'Admin\\PaymentController@getPaymentForm');
$router->post('/payment/save', 'Admin\\PaymentController@save');
2021-05-06 23:10:05 +08:00
$router->post('/payment/drop', 'Admin\\PaymentController@drop');
2022-03-18 02:49:51 +08:00
$router->post('/payment/show', 'Admin\\PaymentController@show');
2022-09-24 02:37:02 +08:00
$router->post('/payment/sort', 'Admin\\PaymentController@sort');
2022-01-27 01:46:26 +08:00
// System
2022-07-20 03:09:06 +08:00
$router->get ('/system/getSystemStatus', 'Admin\\SystemController@getSystemStatus');
2022-07-29 16:20:01 +08:00
$router->get ('/system/getQueueStats', 'Admin\\SystemController@getQueueStats');
$router->get ('/system/getQueueWorkload', 'Admin\\SystemController@getQueueWorkload');
2022-07-20 03:09:06 +08:00
$router->get ('/system/getQueueMasters', '\\Laravel\\Horizon\\Http\\Controllers\\MasterSupervisorController@index');
2022-05-03 03:16:16 +08:00
// Theme
$router->get ('/theme/getThemes', 'Admin\\ThemeController@getThemes');
$router->post('/theme/saveThemeConfig', 'Admin\\ThemeController@saveThemeConfig');
2022-05-09 00:26:38 +08:00
$router->post('/theme/getThemeConfig', 'Admin\\ThemeController@getThemeConfig');
2020-02-01 20:51:45 +08:00
});
}
}