1. Add at tinyUrl at properties.ts. 2. Renamed curatorPhotoService to utilitiesService. 3. Add a isTiny function on HelperFunctions.

git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@56013 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
k.triantafyllou 2019-06-06 10:51:39 +00:00
parent 39bd1e836c
commit f079122f18
3 changed files with 11 additions and 2 deletions

View File

@ -4,7 +4,7 @@ import {CustomOptions} from './servicesUtils/customOptions.class';
import {HttpClient} from '@angular/common/http'; import {HttpClient} from '@angular/common/http';
@Injectable() @Injectable()
export class CuratorPhotoService { export class UtilitiesService {
constructor(private http: HttpClient) { constructor(private http: HttpClient) {
} }
@ -18,4 +18,8 @@ export class CuratorPhotoService {
return this.http.delete(url, CustomOptions.getAuthOptions()); return this.http.delete(url, CustomOptions.getAuthOptions());
} }
getTiny(url: string) {
return this.http.get(url, {responseType: 'text'});
}
} }

View File

@ -8,4 +8,8 @@ export class HelperFunctions {
window.scrollTo(0, 0); window.scrollTo(0, 0);
} }
} }
public static isTiny(url: string) {
return (url.indexOf('tinyurl.com') !== -1);
}
} }

View File

@ -58,6 +58,7 @@ export class EnvProperties {
uploadService; uploadService;
downloadUrl; downloadUrl;
deleteUrl; deleteUrl;
tinyUrl;
vocabulariesAPI; vocabulariesAPI;