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() {
const idRoom = await this.backendService.createRoom();
this.router.navigate([`./editor-live/${idRoom}`]);
await this.router.navigate([`./editor-live/${idRoom}`]);
}
onRunButtonClicked() {

@ -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',

Loading…
Cancel
Save