createApiUrl signature changed

This commit is contained in:
tmshv committed 2020-02-15 04:04:26 +03:00
1 parent b4da11e086
commit d3b5b2d5c6
12 files changed
+15 -18

No files matched your search

+2 -4
View File
@@ -31,10 +31,8 @@ export function wrapInitialProps(fn: (ctx: NextPageContext) => void) {
}
}
export function createApiUrl(req, path) {
const { origin } = absoluteUrl(req, 'localhost:3000')
return `${origin}${path}`
export function createApiUrl(path: string) {
return `https://api.tmshv.com/hudozka${path}`
}
function absoluteUrl(req, defaultLocalhost) {