Skip to content

Commit 8163129

Browse files
authored
comment out all the logouts (#48)
1 parent e7ec02a commit 8163129

File tree

7 files changed

+15
-15
lines changed

7 files changed

+15
-15
lines changed

src/actions/dataset.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export function fetchFilesInDataset(id){
2020
return V2.DatasetsService.getDatasetFilesApiV2DatasetsDatasetIdFilesGet(id).catch(reason => {
2121
if (reason.status === 401){
2222
console.log("Unauthorized!");
23-
logout();
23+
// logout();
2424
}
2525
dispatch(receiveFilesInDataset(RECEIVE_FILES_IN_DATASET, []));
2626
}).then(json => {
@@ -46,7 +46,7 @@ export function fetchDatasetAbout(id){
4646
return V2.DatasetsService.getDatasetApiV2DatasetsDatasetIdGet(id).catch(reason => {
4747
if (reason.status === 401){
4848
console.log("Unauthorized!");
49-
logout();
49+
// logout();
5050
}
5151
dispatch(receiveDatasetAbout(RECEIVE_DATASET_ABOUT, []));
5252
}).then(json => {
@@ -73,7 +73,7 @@ export function fetchDatasets(when, date, limit=5){
7373
return V2.DatasetsService.getDatasetsApiV2DatasetsGet(0, limit).catch(reason => {
7474
if (reason.status === 401){
7575
console.log("Unauthorized!");
76-
logout();
76+
// logout();
7777
}
7878
dispatch(receiveDatasets(RECEIVE_DATASETS, []));
7979
}).then(json => {
@@ -88,7 +88,7 @@ export function datasetCreated(formData){
8888
return V2.DatasetsService.saveDatasetApiV2DatasetsPost(formData).catch(reason => {
8989
if (reason.status === 401) {
9090
console.error("Failed to create dataset: Not authenticated: ", reason);
91-
logout();
91+
// logout();
9292
}
9393
dispatch({
9494
type: CREATE_DATASET,
@@ -111,7 +111,7 @@ export function datasetDeleted(datasetId){
111111
return V2.DatasetsService.deleteDatasetApiV2DatasetsDatasetIdDelete(datasetId).catch(reason => {
112112
if (reason.status === 401){
113113
console.log("Unauthorized!");
114-
logout();
114+
// logout();
115115
}
116116
dispatch({
117117
type: DELETE_DATASET,

src/actions/file.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export function fetchFileMetadata(id){
4646
return V2.FilesService.getFileSummaryApiV2FilesFileIdSummaryGet(id).catch(reason => {
4747
if (reason.status === 401){
4848
console.log("Unauthorized!");
49-
logout();
49+
// logout();
5050
}
5151
dispatch(receiveFileMetadata(RECEIVE_FILE_METADATA, []));
5252
}).then(json => {
@@ -115,7 +115,7 @@ export function fileDeleted(fileId){
115115
return V2.FilesService.deleteFileApiV2FilesFileIdDelete(fileId).catch(reason => {
116116
if (reason.status === 401){
117117
console.log("Unauthorized!");
118-
logout();
118+
// logout();
119119
}
120120
dispatch({
121121
type: DELETE_FILE,
@@ -139,7 +139,7 @@ export function fileCreated(formData, selectedDatasetId){
139139
return V2.FilesService.saveFileApiV2FilesDatasetIdPost(selectedDatasetId, formData).catch(reason => {
140140
if (reason.status === 401) {
141141
console.error("Failed to create file: Not authenticated: ", reason);
142-
logout();
142+
// logout();
143143
}
144144
dispatch({
145145
type: CREATE_FILE,

src/actions/user.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ export async function loginHelper(username, password, register = false) {
1010
if (register) {
1111
return V2.UsersService.saveUserApiV2UsersPost(data).catch(reason => {
1212
console.error("Failed to register a user! ", reason);
13-
logout();
13+
// logout();
1414
return {};
1515
})
1616
.then(user => {return user;});
1717
} else {
1818
return V2.LoginService.loginApiV2LoginPost(data).catch(reason => {
1919
console.error("Failed to login a user! ", reason);
20-
logout();
20+
// logout();
2121
return {};
2222
})
2323
.then(user => {return user;});

src/utils/common.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export async function downloadResource(url) {
3939
return window.URL.createObjectURL(blob);
4040
} else if (response.status === 401) {
4141
// TODO handle error
42-
logout();
42+
// logout();
4343
return null;
4444
} else {
4545
// TODO handle error

src/utils/dataset.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export async function downloadDataset(datasetId, filename = "") {
2828
} else if (response.status === 401) {
2929
// TODO
3030
console.log(response.json());
31-
logout();
31+
// logout();
3232
} else {
3333
console.log(response.json());
3434
}

src/utils/file.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export async function fetchFileMetadata(id) {
1010
return V2.FilesService.getFileSummaryApiV2FilesFileIdSummaryGet(id).catch(reason => {
1111
if (reason.status === 401) {
1212
console.error("Failed to get file summary: Not authenticated: ", reason);
13-
logout();
13+
// logout();
1414
return {};
1515
} else {
1616
console.error("Failed to get file summary: ", reason);
@@ -42,7 +42,7 @@ export async function downloadFile(fileId, filename = "") {
4242
}
4343
} else if (response.status === 401) {
4444
// TODO
45-
logout();
45+
// logout();
4646
console.log(response.json());
4747
} else {
4848
console.log(response.json());

src/utils/thumbnail.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export async function downloadThumbnail(thumbnailId, title=null) {
2323
}
2424
else if (response.status === 401){
2525
// TODO handle error
26-
logout();
26+
// logout();
2727
return null;
2828
}
2929
else {

0 commit comments

Comments
 (0)