Compare commits
9 Commits
5f4ed6228f
...
01ca39da17
| Author | SHA1 | Date | |
|---|---|---|---|
| 01ca39da17 | |||
| 6ec3ba9f23 | |||
|
|
9fc26f5125 | ||
|
|
c7a3fadb96 | ||
|
|
47022bc4e2 | ||
|
|
b2c5473e85 | ||
| 5d8ceb354b | |||
| 071e2140b8 | |||
|
|
13e733b4e2 |
@ -15,7 +15,7 @@ class HeaderAuth
|
||||
*/
|
||||
public function handle(Request $request, Closure $next): Response
|
||||
{
|
||||
if (hash_equals(config('bot.header_auth'), $request->header('X-BOTAUTH'))) {
|
||||
if (!hash_equals(config('bot.header_auth'), $request->header('X-BOTAUTH'))) {
|
||||
return response('Unauthorized', 401);
|
||||
}
|
||||
|
||||
|
||||
@ -2,5 +2,5 @@
|
||||
|
||||
return [
|
||||
'webhook' => env('BOT_SLACK_WEBHOOK_URL', ''),
|
||||
'header_auth' => env('BOT_SLACK_WEBHOOK_URL', ''),
|
||||
'header_auth' => env('BOT_X_BOTAUTH', ''),
|
||||
];
|
||||
|
||||
9
resources/views/admin/send.blade.php
Normal file
9
resources/views/admin/send.blade.php
Normal file
@ -0,0 +1,9 @@
|
||||
<x-app-layout>
|
||||
<div class="py-12">
|
||||
<div class="max-w-7xl mx-auto sm:px-6 lg:px-8">
|
||||
<div class="p-6 text-nexi-black dark:text-gray-100">
|
||||
<livewire:pages.admin.send/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</x-app-layout>
|
||||
@ -35,7 +35,7 @@
|
||||
<ul role="list" class="-mx-2 mt-2 space-y-1">
|
||||
<li>
|
||||
{{-- TODO: fill with SVG icons to make it pretty --}}
|
||||
{{-- <x-sidebar-nav :href="route('a-1')" route="a-1">First Page</x-sidebar-nav>--}}
|
||||
<x-sidebar-nav :href="route('admin.send')" route="send">Send Quote</x-sidebar-nav>
|
||||
</li>
|
||||
<li>
|
||||
{{-- TODO: fill with SVG icons to make it pretty --}}
|
||||
|
||||
@ -1,5 +1,9 @@
|
||||
<x-app-layout>
|
||||
@if(auth()->user()->is_admin)
|
||||
<livewire:pages.admin.send/>
|
||||
@endif
|
||||
<div class="py-12">
|
||||
<div class="max-w-7xl mx-auto sm:px-6 lg:px-8">
|
||||
<div class="p-6 text-nexi-black dark:text-gray-100">
|
||||
{{ __("You're logged in!") }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</x-app-layout>
|
||||
|
||||
@ -25,6 +25,10 @@ Route::view('profile', 'profile')
|
||||
->middleware(['auth'])
|
||||
->name('profile');
|
||||
|
||||
Route::view('send', 'admin.send')
|
||||
->middleware(['auth'])
|
||||
->name('admin.send');
|
||||
|
||||
Route::middleware('guest')->group(function () {
|
||||
Volt::route('login', 'pages.auth.login')
|
||||
->name('login');
|
||||
|
||||
Reference in New Issue
Block a user