#tradewind:update wechat auth
This commit is contained in:
parent
4366c4a2ef
commit
6da5389988
@ -8,7 +8,17 @@ use Illuminate\Http\Request;
|
||||
class WechatAuthController extends Controller
|
||||
{
|
||||
//
|
||||
public function checkSign(Request $request)
|
||||
public function auth(Request $request)
|
||||
{
|
||||
if ($this->checkSign($request)) {
|
||||
return $request->echostr;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
private function checkSign($request)
|
||||
{
|
||||
$signature = $request->signature;
|
||||
$timestamp = $request->timestamp;
|
||||
|
@ -24,7 +24,7 @@ Route::namespace('Api')->prefix('v1')->group(function () {
|
||||
Route::any('/test', [TestController::class, 'index'])->name('test.index');
|
||||
|
||||
Route::prefix('wechat')->group(function () {
|
||||
Route::get('/auth', [WechatAuthController::class, 'checkSign'])->name('wechat.auth.checkSign');
|
||||
Route::get('/auth', [WechatAuthController::class, 'auth'])->name('wechat.auth.auth');
|
||||
});
|
||||
});
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user