Skip to content

Commit

Permalink
fix(web): add withCredentials
Browse files Browse the repository at this point in the history
  • Loading branch information
634750802 committed Dec 8, 2022
1 parent 9ba73b5 commit 19a5a6b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions web/src/api/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ export async function postPlaygroundSQL (params: {
type: 'repo' | 'user';
id: string;
}): Promise<any> {
return await clientWithoutCache.post('/q/playground', params).then((data) => data);
return await clientWithoutCache.post('/q/playground', params, { withCredentials: true }).then((data) => data);
}

export async function aiQuestion (question: string) {
const { sql } = await clientWithoutCache.post<any, { sql: string }>('/bot/questionToSQL', { question });
const { sql } = await clientWithoutCache.post<any, { sql: string }>('/bot/questionToSQL', { question }, { withCredentials: true });
return sql;
}

0 comments on commit 19a5a6b

Please sign in to comment.