frontend: Refactor API path constants in HttpService
This commit is contained in:
parent
d7b84df956
commit
cf447c0892
@ -77,19 +77,19 @@ export class HttpService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
login(body: { username: string; password: string }): Promise<{ message: string }> {
|
login(body: { username: string; password: string }): Promise<{ message: string }> {
|
||||||
return this.postRequest(`${this.pathPrefix}/${this.apiVersion}/auth/login`, body);
|
return this.postRequest(`${this.API_PATH_PREFIX}/${this.API_V1_VERSION}/auth/login`, body);
|
||||||
}
|
}
|
||||||
|
|
||||||
logout(): Promise<{ message: string }> {
|
logout(): Promise<{ message: string }> {
|
||||||
return this.postRequest(`${this.pathPrefix}/${this.apiVersion}/auth/logout`);
|
return this.postRequest(`${this.API_PATH_PREFIX}/${this.API_V1_VERSION}/auth/logout`);
|
||||||
}
|
}
|
||||||
|
|
||||||
refreshToken(): Promise<{ message: string }> {
|
refreshToken(): Promise<{ message: string }> {
|
||||||
return this.postRequest(`${this.pathPrefix}/${this.apiVersion}/auth/refresh`);
|
return this.postRequest(`${this.API_PATH_PREFIX}/${this.API_V1_VERSION}/auth/refresh`);
|
||||||
}
|
}
|
||||||
|
|
||||||
getProfile(): Promise<User> {
|
getProfile(): Promise<User> {
|
||||||
return this.getRequest(`${this.pathPrefix}/${this.apiVersion}/auth/profile`);
|
return this.getRequest(`${this.API_PATH_PREFIX}/${this.API_V1_VERSION}/auth/profile`);
|
||||||
}
|
}
|
||||||
|
|
||||||
getRecordings(continuationToken?: string): Promise<{ recordings: RecordingInfo[]; continuationToken: string }> {
|
getRecordings(continuationToken?: string): Promise<{ recordings: RecordingInfo[]; continuationToken: string }> {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user