modified: serv_nginx/bbvue/src/stores/user.js
modified: serv_nginx/bbvue/src/views/Profile.vue change GET path for personal-bests
This commit is contained in:
@@ -155,7 +155,7 @@ export const useUserStore = defineStore('user', () => {
|
||||
const fetchPersonalBests = async () => {
|
||||
return withStoreLoading(async () => {
|
||||
try {
|
||||
const response = await apiClient.get('/personal-bests')
|
||||
const response = await apiClient.get('/user/personal-bests')
|
||||
console.log("debug /user/personal-bests " + response.data)
|
||||
personalBests.value = response.data
|
||||
return { success: true, data: personalBests.value }
|
||||
|
||||
@@ -250,9 +250,6 @@ export default {
|
||||
if (!this.user?.created_at) {
|
||||
return 'Неизвестно';
|
||||
}
|
||||
|
||||
console.log('DEBUG - created_at:', this.user.created_at, 'Type:', typeof this.user.created_at);
|
||||
|
||||
// Пробуем разные форматы даты
|
||||
let date;
|
||||
if (this.user.created_at.includes('T')) {
|
||||
@@ -375,7 +372,7 @@ export default {
|
||||
|
||||
async fetchPersonalBests() {
|
||||
try {
|
||||
const response = await this.userStore.apiClient.get('/personal-bests');
|
||||
const response = await this.userStore.fetchPersonalBests;
|
||||
this.personalBests = response.data;
|
||||
return { success: true };
|
||||
} catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user