|
|
|
@ -17,12 +17,12 @@ export class BackendService {
|
|
|
|
|
constructor() {}
|
|
|
|
|
|
|
|
|
|
async createRoom() {
|
|
|
|
|
const reponse = await fetch(this.apiUrl + '/live');
|
|
|
|
|
const reponse = await fetch(`${this.apiUrl}/live`, { method: 'POST' });
|
|
|
|
|
return reponse.text();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
executeCode(code: string, language: string) {
|
|
|
|
|
const sse = new SSE(this.apiUrl + '/run', {
|
|
|
|
|
const sse = new SSE(`${this.apiUrl}/run`, {
|
|
|
|
|
method: 'POST',
|
|
|
|
|
headers: {
|
|
|
|
|
'Content-Type': 'application/json',
|
|
|
|
|