From ab1beea23e7637077cd1b74d3c5a734230e1c400 Mon Sep 17 00:00:00 2001 From: Andrew Duncan Date: Tue, 3 Apr 2018 13:00:02 -0400 Subject: [PATCH] Comment out goo.gl url shortener code (#236) * for now we do not use goo.gl to shorten urls, we just return the long url * removed google shortener key --- src/app/search/search.component.ts | 10 ++-------- src/app/shared/dockstore.model.ts | 3 --- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/src/app/search/search.component.ts b/src/app/search/search.component.ts index fafee87142..499ad50fe5 100644 --- a/src/app/search/search.component.ts +++ b/src/app/search/search.component.ts @@ -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; } /**=============================================== diff --git a/src/app/shared/dockstore.model.ts b/src/app/shared/dockstore.model.ts index ad69306334..8445b007dd 100644 --- a/src/app/shared/dockstore.model.ts +++ b/src/app/shared/dockstore.model.ts @@ -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';