Skip to content
This repository has been archived by the owner on Jul 8, 2020. It is now read-only.

Commit

Permalink
Removed ApiServer.js and dependency on it.
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-balint committed Jun 19, 2016
1 parent 01c26dd commit a15d430
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 13 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ jspm_packages

# Sensitive Info
download_ctrp.sh
ApiServer.js

# Large data files
data/*
Expand Down
15 changes: 3 additions & 12 deletions search/client/lib/ApiFetch.js
Original file line number Diff line number Diff line change
@@ -1,20 +1,11 @@
import fetch from 'isomorphic-fetch';
import ApiServer from './ApiServer';

function ApiFetch(endpointQuery) {

var opt;
const host = "https://clinicaltrialsapi.cancer.gov";
// const host = "http://localhost:3000";

if(ApiServer.username && ApiServer.password) {
const token = btoa(`${ApiServer.username}:${ApiServer.password}`);
opt = {
"headers": {
"Authorization": `Basic ${token}`
}
};
}

return fetch(`${ApiServer.host}/${endpointQuery}`, opt);
return fetch(`${host}/${endpointQuery}`);

};

Expand Down

0 comments on commit a15d430

Please sign in to comment.