Fix
This commit is contained in:
@@ -41,8 +41,9 @@ export const usersApi = {
|
||||
},
|
||||
|
||||
// Получить аватар пользователя как blob URL
|
||||
getAvatarUrl: async (userId: number): Promise<string> => {
|
||||
const response = await client.get(`/users/${userId}/avatar`, {
|
||||
getAvatarUrl: async (userId: number, bustCache = false): Promise<string> => {
|
||||
const cacheBuster = bustCache ? `?t=${Date.now()}` : ''
|
||||
const response = await client.get(`/users/${userId}/avatar${cacheBuster}`, {
|
||||
responseType: 'blob',
|
||||
})
|
||||
return URL.createObjectURL(response.data)
|
||||
|
||||
Reference in New Issue
Block a user