update auth

This commit is contained in:
pbao9
2025-08-05 08:58:40 +07:00
parent fc277e5ef6
commit 1a9ade38e8
6 changed files with 81 additions and 54 deletions
@@ -2,7 +2,7 @@
<!-- Avatar -->
<button @click="open = !open" @click.away="open = false"
class="w-8 h-8 rounded-full overflow-hidden shadow-lg image-fit zoom-in focus:outline-none">
<img src="{{ asset('template/' . customer()?->avatar) ?? asset('images/avatar.png') }}" alt="Avatar">
<img src="{{ asset('images/avatar.png') }}" alt="Avatar">
</button>
<!-- Dropdown -->
-1
View File
@@ -79,7 +79,6 @@
@include("frontend.sidebar")
<div class="main content-wrapper d-flex flex-column align-items-stretch flex-shrink-0 bg-white p-3 px-lg-5">
<h1>{{ $title }}</h1>
@include("alerts")
@yield("content")
</div>
@include("frontend.footer")
@@ -112,10 +112,9 @@
const getTicket = new Promise((resolve, reject) => {
$.ajax({
url: '{{ route('api.GetConsoleTicket') }}',
url: '{{ route('api.user.GetConsoleTicket') }}',
type: 'get',
headers: {
'X-CSRF-TOKEN': '{{ csrf_token() }}',
'Accept': 'application/json',
'Authorization': 'Bearer {{ request()->cookie('aut_accessToken') }}'
},
@@ -128,6 +127,10 @@
} else {
reject(response.message)
}
},
error: function(xhr, status, error) {
console.error('API Error:', xhr.responseText);
reject('API request failed: ' + error);
}
})
});