Skip to content

Commit

Permalink
Comment out goo.gl url shortener code (#236)
Browse files Browse the repository at this point in the history
* for now we do not use goo.gl to shorten urls, we just return the long url
* removed google shortener key
  • Loading branch information
agduncan94 authored Apr 3, 2018
1 parent d0c164e commit ab1beea
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
10 changes: 2 additions & 8 deletions src/app/search/search.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -433,15 +433,9 @@ export class SearchComponent implements OnInit {
}

// Given a URL, will attempt to shorten it
// TODO: Find another method for shortening URLs
setShortUrl(url: string) {
const googleUrlShortenerBase = 'https://www.googleapis.com/urlshortener/v1/url?key=';
const body = {'longUrl': url};
const req = this.http.post(googleUrlShortenerBase + Dockstore.GOOGLE_SHORTENER_KEY, body);

const sub = req.subscribe(
data => { this.shortUrl = data['id']; },
err => { this.shortUrl = url; }
);
this.shortUrl = url;
}

/**===============================================
Expand Down
3 changes: 0 additions & 3 deletions src/app/shared/dockstore.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,6 @@ export class Dockstore {
// Discourse URL MUST end with a slash (/)
static readonly DISCOURSE_URL = 'http://localhost/';

// Google Shortener API key (https://developers.google.com/url-shortener/v1/getting_started#APIKey)
static readonly GOOGLE_SHORTENER_KEY = 'fill_this_in';

static readonly LOCAL_URI = Dockstore.HOSTNAME + ':' + Dockstore.UI_PORT;
static readonly API_URI = Dockstore.HOSTNAME + ':' + Dockstore.API_PORT;
static readonly DNASTACK_IMPORT_URL= 'https://app.dnastack.com/#/app/workflow/import/dockstore';
Expand Down

0 comments on commit ab1beea

Please sign in to comment.