|
|
|
@ -28,10 +28,10 @@ export const addXlsFile = async (file: File) => {
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export const getSessionsList = (user: User) => {
|
|
|
|
|
export const getSessionsList = () => {
|
|
|
|
|
return async dispatch => {
|
|
|
|
|
try {
|
|
|
|
|
const sessionsPromise = await fetch('https://r-dash.azurewebsites.net/Sessions/'+user.getUsername);
|
|
|
|
|
const sessionsPromise = await fetch('https://r-dash.azurewebsites.net/FullSession');
|
|
|
|
|
const sessionsListJson = await sessionsPromise.json();
|
|
|
|
|
const sessionsList: Session[] = sessionsListJson.map(elt => {
|
|
|
|
|
const laps: Lap[] = elt.laps.map(lap => {
|
|
|
|
|