Skip to content

Commit

Permalink
Simulates API versions
Browse files Browse the repository at this point in the history
  • Loading branch information
waldekmastykarz committed May 17, 2024
1 parent a1ac523 commit a4e4bf6
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/web/src/services/restService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ export abstract class RestService<T extends Entity> {

public constructor(baseUrl: string, baseRoute: string) {
this.client = axios.create({
baseURL: `${baseUrl}${baseRoute}`
baseURL: `${baseUrl}${baseRoute}`,
params: {
'api-version': '1.0'
}
});
}

Expand Down Expand Up @@ -64,7 +67,10 @@ export abstract class RestService<T extends Entity> {
const response = await this.client.request<T>({
method: 'PUT',
url: entity.id,
data: entity
data: entity,
params: {
'api-version': 'beta'
}
});

return response.data;
Expand Down

0 comments on commit a4e4bf6

Please sign in to comment.