(url: string)
| 63 | // ESLint doesn't recognize that invariant always throws |
| 64 | // eslint-disable-next-line consistent-return |
| 65 | function getAppURLFactsFromRequestURL(url: string): AppURLFacts { |
| 66 | const webAppURLFacts = getWebAppURLFacts(); |
| 67 | if (webAppURLFacts && url.startsWith(webAppURLFacts.baseRoutePath)) { |
| 68 | return webAppURLFacts; |
| 69 | } |
| 70 | const keyserverURLFacts = getKeyserverURLFacts(); |
| 71 | if (keyserverURLFacts && url.startsWith(keyserverURLFacts.baseRoutePath)) { |
| 72 | return keyserverURLFacts; |
| 73 | } |
| 74 | invariant(false, 'request received but no URL facts are present'); |
| 75 | } |
| 76 | |
| 77 | function getLandingURLFacts(): ?AppURLFacts { |
| 78 | return cachedURLFacts.get('landing'); |
no test coverage detected