Skip to content

Commit

Permalink
fix: properly urlencode arguments to dotty API call (#323) (#325)
Browse files Browse the repository at this point in the history
  • Loading branch information
holtgrewe authored Dec 21, 2023
1 parent fabc262 commit 699c654
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion frontend/src/api/dotty.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ export class DottyClient {
}

async toSpdi(q: string, assembly: 'GRCh37' | 'GRCh38' = 'GRCh38'): Promise<DottyResponse | null> {
const url = `${API_INTERNAL_BASE_PREFIX_DOTTY}/api/v1/to-spdi?q=${q}&assembly=${assembly}`
const escapedQ = encodeURIComponent(q)
const url = `${API_INTERNAL_BASE_PREFIX_DOTTY}/api/v1/to-spdi?q=${escapedQ}&assembly=${assembly}`
const response = await fetch(url, {
method: 'GET'
})
Expand Down

0 comments on commit 699c654

Please sign in to comment.