Greatly improve the frontent for history etc.

This commit is contained in:
Tim
2021-07-14 20:41:29 +02:00
parent 24c5554a41
commit 019f359854
3 changed files with 155 additions and 63 deletions

View File

@@ -55,6 +55,13 @@ export default class PerudoApi {
});
}
public callBluff(playerId: string): Promise<MyTurnObject> {
return this.post<MyTurnObject>('player/call/' + playerId)
.then((response: AxiosResponse<MyTurnObject>) => {
return response.data;
});
}
private get<T extends ApiObject>(url: string, getParameters?: Record<string, any>): AxiosPromise<T> {
return axios.get(PerudoApi.baseUrl + url).then((response: AxiosResponse<T>) => {
// @ts-ignore