diff --git a/src/api/sessions.test.tsx b/src/api/sessions.test.tsx index 03ad384e6..20a95af63 100644 --- a/src/api/sessions.test.tsx +++ b/src/api/sessions.test.tsx @@ -16,7 +16,7 @@ describe('session api functions', () => { mockData = { name: 'test', summary: 'test', - session_data: {}, + session: {}, auto_saved: false, _id: '1', }; diff --git a/src/api/sessions.tsx b/src/api/sessions.tsx index 8915d5916..1eebf7099 100644 --- a/src/api/sessions.tsx +++ b/src/api/sessions.tsx @@ -17,7 +17,7 @@ const saveSession = (apiUrl: string, session: Session): Promise => { queryParams.append('auto_saved', session.auto_saved.toString()); return axios - .post(`${apiUrl}/sessions`, session.session_data, { + .post(`${apiUrl}/sessions`, session.session, { params: queryParams, headers: { Authorization: `Bearer ${readSciGatewayToken()}`, diff --git a/src/app.types.tsx b/src/app.types.tsx index 074b1fe32..9ab06017c 100644 --- a/src/app.types.tsx +++ b/src/app.types.tsx @@ -234,7 +234,7 @@ export interface Session { name: string; summary: string; auto_saved: boolean; - session_data: ImportSessionType; + session: ImportSessionType; } export interface SessionResponse { diff --git a/src/session/__snapshots__/sessionDrawer.component.test.tsx.snap b/src/session/__snapshots__/sessionDrawer.component.test.tsx.snap index 793a14612..0bcd7c3f9 100644 --- a/src/session/__snapshots__/sessionDrawer.component.test.tsx.snap +++ b/src/session/__snapshots__/sessionDrawer.component.test.tsx.snap @@ -64,14 +64,14 @@ exports[`session Drawer renders correctly 1`] = ` - Session 1 + Session 3