(targetUrl: string, token?: string)
| 25 | |
| 26 | /** Re-host targetUrl onto the backend resolved from the token. */ |
| 27 | export function getUrlFromToken(targetUrl: string, token?: string): string { |
| 28 | const target = new URL(targetUrl); |
| 29 | const { protocol, host } = new URL(getBaseUrlFromToken(token)); |
| 30 | Object.assign(target, { protocol, host }); |
| 31 | return target.toString(); |
| 32 | } |
| 33 | |
| 34 | export const APP_URL = "https://app.matterai.so"; |
| 35 |
no test coverage detected