()
| 3 | import { RoomType } from '../../types'; |
| 4 | |
| 5 | export function getPasscode() { |
| 6 | const match = window.location.search.match(/passcode=(.*)&?/); |
| 7 | const passcode = match ? match[1] : window.sessionStorage.getItem('passcode'); |
| 8 | return passcode; |
| 9 | } |
| 10 | |
| 11 | export function fetchToken(name: string, room: string, passcode: string, create_room = true) { |
| 12 | return fetch(`/token`, { |
no test coverage detected