Commit 2d06f672 authored by UtopiaXC's avatar UtopiaXC

🐟 摸鱼~

parent 424491b5
...@@ -2,5 +2,5 @@ ...@@ -2,5 +2,5 @@
这是一款基于Laravel的可以即时部署在任何服务器上的开源开放平台,正在开发。 这是一款基于Laravel的可以即时部署在任何服务器上的开源开放平台,正在开发。
具体进展请参考dev分支 具体进展请参考dev分支
## 原型:index ## 原型:[index](https://open.utopiaxc.cn/)
![index.png](images/index.png) ![index.png](images/index.png)
...@@ -52,7 +52,6 @@ ...@@ -52,7 +52,6 @@
<h4>基本信息</h4> <h4>基本信息</h4>
<table> <table>
</table> </table>
</div> </div>
</div> </div>
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
use App\Http\Controllers\CaptchaController; use App\Http\Controllers\CaptchaController;
use App\Http\Controllers\UserController; use App\Http\Controllers\UserController;
use App\Http\Utils\R;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use Illuminate\Support\Facades\Route; use Illuminate\Support\Facades\Route;
...@@ -16,7 +17,28 @@ use Illuminate\Support\Facades\Route; ...@@ -16,7 +17,28 @@ use Illuminate\Support\Facades\Route;
| |
*/ */
Route::get(ApiUrl::CAPTCHA,[CaptchaController::class,"getCaptcha"]); Route::get(ApiUrl::CAPTCHA, [CaptchaController::class, "getCaptcha"]);
Route::post(ApiUrl::USER.ApiUrl::REGISTER, [UserController::class,"register"]); Route::post(ApiUrl::USER . ApiUrl::REGISTER, [UserController::class, "register"]);
Route::post(ApiUrl::USER.ApiUrl::LOGIN,[UserController::class,"login"]); Route::post(ApiUrl::USER . ApiUrl::LOGIN, [UserController::class, "login"]);
Route::put(ApiUrl::USER.ApiUrl::LOGOUT,[UserController::class,"logout"]); Route::put(ApiUrl::USER . ApiUrl::LOGOUT, [UserController::class, "logout"]);
//暂时使用 用于Telegram消息推送
Route::group(['prefix' => '/', 'middleware' => [Middleware::AUTH_MIDDLEWARE]], function () {
Route::post("/send_telegram", function (Request $request) {
if (@!$request->get("token") || @!$request->get("message") || @!$request->get("bot_id") || @!$request->get("chat_id")) {
return R::error(HTTP_CODE::NOT_ACCEPT_PARAMS_CONTENT_WRONG);
}
$disable_notification = false;
if (@$request->get('$disable_notification') == true) {
$disable_notification = true;
}
$response=Http::post('https://api.utopiaxc.com/sendTelegramMessage.php', [
'token' => $request->get("token"),
'message' => $request->get("message"),
'bot_id' => $request->get("bot_id"),
'chat_id' =>$request->get("chat_id"),
'disable_notification' =>$disable_notification
]);
return R::ok();
});
});
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment