fix and update
This commit is contained in:
@@ -1007,6 +1007,7 @@ export async function apiFetch<T>(
|
||||
? { 'Content-Type': 'application/json' }
|
||||
: {}),
|
||||
...(resolvedToken ? { Authorization: `Bearer ${resolvedToken}` } : {}),
|
||||
...(behavior.silent ? { 'X-Id-Passive-Activity': '1' } : {}),
|
||||
...(options.headers as Record<string, string> | undefined)
|
||||
};
|
||||
|
||||
@@ -1075,8 +1076,14 @@ export interface MediaAccessResponse {
|
||||
expiresAt: string;
|
||||
}
|
||||
|
||||
export async function fetchDocumentPhotoUrl(userId: string, storageKey: string, token?: string | null) {
|
||||
export async function fetchDocumentPhotoUrl(
|
||||
userId: string,
|
||||
storageKey: string,
|
||||
token?: string | null,
|
||||
fileName?: string
|
||||
) {
|
||||
const query = new URLSearchParams({ storageKey });
|
||||
if (fileName) query.set('fileName', fileName);
|
||||
return apiFetch<MediaAccessResponse>(`/media/users/${userId}/documents/photo-url?${query.toString()}`, {}, token);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user