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 () => {
|
const fetchPersonalBests = async () => {
|
||||||
return withStoreLoading(async () => {
|
return withStoreLoading(async () => {
|
||||||
try {
|
try {
|
||||||
const response = await apiClient.get('/personal-bests')
|
const response = await apiClient.get('/user/personal-bests')
|
||||||
console.log("debug /user/personal-bests " + response.data)
|
console.log("debug /user/personal-bests " + response.data)
|
||||||
personalBests.value = response.data
|
personalBests.value = response.data
|
||||||
return { success: true, data: personalBests.value }
|
return { success: true, data: personalBests.value }
|
||||||
|
|||||||
@@ -250,9 +250,6 @@ export default {
|
|||||||
if (!this.user?.created_at) {
|
if (!this.user?.created_at) {
|
||||||
return 'Неизвестно';
|
return 'Неизвестно';
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log('DEBUG - created_at:', this.user.created_at, 'Type:', typeof this.user.created_at);
|
|
||||||
|
|
||||||
// Пробуем разные форматы даты
|
// Пробуем разные форматы даты
|
||||||
let date;
|
let date;
|
||||||
if (this.user.created_at.includes('T')) {
|
if (this.user.created_at.includes('T')) {
|
||||||
@@ -375,7 +372,7 @@ export default {
|
|||||||
|
|
||||||
async fetchPersonalBests() {
|
async fetchPersonalBests() {
|
||||||
try {
|
try {
|
||||||
const response = await this.userStore.apiClient.get('/personal-bests');
|
const response = await this.userStore.fetchPersonalBests;
|
||||||
this.personalBests = response.data;
|
this.personalBests = response.data;
|
||||||
return { success: true };
|
return { success: true };
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|||||||
Reference in New Issue
Block a user