Commit be6cf140 authored by Lukas Burgey's avatar Lukas Burgey

Merge branch 'urls' into dev

parents a2b25760 b2e34dc9
......@@ -221,7 +221,7 @@ export class UserService {
}
private fetch(): void {
this.http.get<State>('/backend/api/state').subscribe(
this.http.get<State>('/webpage/state').subscribe(
(state: State) => this.updateState(state),
this.handleError(false, 'Error fetching state. Try again later'),
);
......@@ -270,7 +270,7 @@ export class UserService {
}
private fetchIdPInfo(): void {
this.http.get<IdPInfo>('/backend/auth/v1/info').subscribe(
this.http.get<IdPInfo>('/auth/info').subscribe(
idpInfo => {
this.idpInfo.next(idpInfo);
this.idpInfo.complete();
......@@ -328,7 +328,7 @@ export class UserService {
}
public logout(): void {
this.http.post<State>('/backend/auth/v1/logout', undefined).subscribe(
this.http.post<State>('/auth/logout', undefined).subscribe(
(state: State) => this.updateState(state),
(err: HttpErrorResponse) => {
this.updateState(undefined);
......@@ -337,7 +337,7 @@ export class UserService {
}
public deleteUser() {
return this.http.delete('/rest/user').pipe(
return this.http.delete('/user/user').pipe(
catchError(this.handleError(true, 'Error deleting user')),
).subscribe(
_ => {
......@@ -350,7 +350,7 @@ export class UserService {
public uploadSshKey(name: string, key: string | ArrayBuffer): void {
this.http.post<SSHKey>(
'/rest/ssh-keys',
'/user/ssh-keys',
{'name': name, 'key': key},
).pipe(
catchError(this.handleError(true, 'Error changing deployment')),
......@@ -366,7 +366,7 @@ export class UserService {
public removeSshKey(key: SSHKey) {
console.log('Deleting key:', key);
return this.http.delete(
`/rest/ssh-key/${ key.id.toString() }`,
`/user/ssh-key/${ key.id.toString() }`,
).pipe(
catchError(this.handleError(true, 'Error changing deployment')),
).subscribe(
......@@ -380,7 +380,7 @@ export class UserService {
public patchDeployment(depType: string, stateTarget: string, id: number): void {
this.http.patch<Deployment>(
`/rest/deployment/${ depType }/${ id.toString() }`,
`/user/deployment/${ depType }/${ id.toString() }`,
{'state_target': stateTarget},
).pipe(
catchError(this.handleError(true, 'Error changing deployment')),
......@@ -391,7 +391,7 @@ export class UserService {
public sentQuestionnaire(stateItemID: number, answers: JSONObject) {
return this.http.patch<DeploymentState>(
`/rest/state/${ stateItemID }`,
`/user/state/${ stateItemID }`,
{'answers': answers},
).pipe(
catchError(this.handleError(true, 'Error submitting answers')),
......
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