Commit aabd33dc authored by Dennis Willers's avatar Dennis Willers 🏀

Change Request Path to Middleware (Tablename changed)

parent 1de125ca
Pipeline #288 passed with stages
in 5 minutes and 17 seconds
......@@ -22,16 +22,16 @@ export class TabuMiddlewareService {
});
}
getSpielSessions(): Promise<any> {
return this.request('GET', `${environment.tabuMiddlewareURL}SpielSession`);
getSessions(): Promise<any> {
return this.request('GET', `${environment.tabuMiddlewareURL}Session`);
}
isSpielSession(req: any): Promise<any> {
return this.request('POST', `${environment.tabuMiddlewareURL}isSpielSession`, req);
isSession(req: any): Promise<any> {
return this.request('POST', `${environment.tabuMiddlewareURL}isSession`, req);
}
addSpielSession(req: any): Promise<any> {
addSession(req: any): Promise<any> {
console.log(req);
return this.request('POST', `${environment.tabuMiddlewareURL}addSpielSession`, req);
return this.request('POST', `${environment.tabuMiddlewareURL}addSession`, req);
}
}
......@@ -19,12 +19,12 @@ export class SelectGameComponent implements OnInit {
getSpielSessions(): any {
console.log('Start');
const response = this.server.getSpielSessions();
const response = this.server.getSessions();
console.log('Response:', response);
}
createGame(spielname: string): void {
this.server.addSpielSession({"spielname": '' + spielname + ''}).then(value => {
this.server.addSession({"spielname": '' + spielname + ''}).then(value => {
console.log(value);
const status = JSON.parse(value.status);
if (status) {
......@@ -55,7 +55,7 @@ export class SelectGameComponent implements OnInit {
this.buttonJoinGameDisabled = true;
return;
} else {
this.server.isSpielSession({'spielname': spielname}).then(value => {
this.server.isSession({'spielname': spielname}).then(value => {
console.log('Response: ', value.status);
const status = JSON.parse(value.status);
if (status) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment