stream doesn't want to work

This commit is contained in:
root 2022-10-01 14:30:18 +02:00
parent d7ed57bbdd
commit 9656926a07
287 changed files with 6934 additions and 0 deletions

View file

@ -0,0 +1,19 @@
import { URL_CHAT_REGISTRATION } from '../utils/constants.js';
export async function registerChat(username) {
const options = {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({ displayName: username }),
};
try {
const response = await fetch(URL_CHAT_REGISTRATION, options);
const result = await response.json();
return result;
} catch (e) {
console.error(e);
}
}