retour merge request
continuous-integration/drone/pr Build is passing Details
continuous-integration/drone/push Build is passing Details

pull/11/head
Bastien OLLIER 1 year ago
parent 52dfc0e75e
commit 09b0e1b2ee

@ -170,7 +170,7 @@ export class EditorComponent {
async onCreateRoomButtonClicked() { async onCreateRoomButtonClicked() {
const idRoom = await this.backendService.createRoom(); const idRoom = await this.backendService.createRoom();
this.router.navigate([`./editor-live/${idRoom}`]); await this.router.navigate([`./editor-live/${idRoom}`]);
} }
onRunButtonClicked() { onRunButtonClicked() {

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

Loading…
Cancel
Save