fix: add Content-Type header to createProjectShare API call
This commit is contained in:
@@ -450,7 +450,7 @@ export async function getProjectShares(token: string, projectId: string): Promis
|
||||
export async function createProjectShare(token: string, projectId: string, data: { shared_with_email: string; permission?: string }): Promise<ProjectShare> {
|
||||
const res = await fetch(`${API_BASE}/api/projects/${projectId}/shares`, {
|
||||
method: 'POST',
|
||||
headers: authHeaders(token),
|
||||
headers: { ...authHeaders(token), 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify(data),
|
||||
});
|
||||
if (!res.ok) throw new Error('Failed to create share');
|
||||
|
||||
Reference in New Issue
Block a user