Skip to content

Commit

Permalink
chore: removing buildCodaBaseUrl
Browse files Browse the repository at this point in the history
Need to refactor stampy.ts further to use.
Would want to have more tests befoe this refactor.
  • Loading branch information
jrhender committed Jul 30, 2023
1 parent e7cf3bb commit 0c539de
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions app/server-utils/coda-urls.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,6 @@ export const makeCodaRequest = ({table, queryColumn, queryValue, limit}: CodaReq
}

export const CODA_DOC_ID = 'fau7sl2hmG'
const buildCodaBaseUrl = ({table, rowId}: {table: string; rowId?: string}) =>
`https://coda.io/apis/v1/docs/${CODA_DOC_ID}/tables/${enc(table)}/rows${
rowId ? `/${enc(rowId)}` : ''
}`

const enc = encodeURIComponent
const quote = (x: string) => encodeURIComponent(`"${x.replace(/"/g, '\\"')}"`)

0 comments on commit 0c539de

Please sign in to comment.