Skip to content
This repository was archived by the owner on Feb 6, 2024. It is now read-only.

Commit 3a002c8

Browse files
feat(#110): use unsplash proxy
1 parent e1fc8f9 commit 3a002c8

File tree

5 files changed

+8
-11
lines changed

5 files changed

+8
-11
lines changed

studio/src/app/services/api/photo/photo.service.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export class PhotoService {
2525
return new Promise<UnsplashSearchResponse>(async (resolve) => {
2626
const config: EnvironmentUnsplashConfig = EnvironmentConfigService.getInstance().get('unsplash');
2727

28-
const searchUrl: string = config.url + 'search/photos/?query=' + searchTerm + '&client_id=' + config.key + '&page=' + next;
28+
const searchUrl: string = config.url + 'search/photos/?query=' + searchTerm + '&page=' + next;
2929

3030
try {
3131
const rawResponse: Response = await fetch(searchUrl);
@@ -50,7 +50,7 @@ export class PhotoService {
5050
return new Promise<void>(async (resolve) => {
5151
const config: EnvironmentUnsplashConfig = EnvironmentConfigService.getInstance().get('unsplash');
5252

53-
const shareUrl: string = config.url + 'photos/' + photoId +'/download/?client_id=' + config.key;
53+
const shareUrl: string = config.url + 'photos/' + photoId +'/download/';
5454

5555
try {
5656
await fetch(shareUrl);

studio/src/app/services/core/environment/environment-config.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ export interface EnvironmentTenorConfig {
1414

1515
export interface EnvironmentUnsplashConfig {
1616
url: string;
17-
key: string;
1817
}
1918

2019
export interface EnvironmentConfig {

studio/src/components.d.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@
88
import '@stencil/core';
99

1010
import '@ionic/core';
11+
import 'ionicons';
1112
import 'deckdeckgo';
12-
import 'deckdeckgo-highlight-code';
1313
import 'deckdeckgo-inline-editor';
14-
import 'deckdeckgo-lazy-img';
15-
import 'deckdeckgo-qrcode';
1614
import 'deckdeckgo-remote';
17-
import 'ionicons';
15+
import 'deckdeckgo-qrcode';
16+
import 'deckdeckgo-highlight-code';
17+
import 'deckdeckgo-lazy-img';
1818
import {
1919
EventEmitter,
2020
} from '@stencil/core';

studio/src/global/app-dev.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,7 @@ setupConfig({
2525
key: '<@TENOR_KEY@>'
2626
},
2727
unsplash: {
28-
url: 'https://api.unsplash.com/',
29-
key: '<@UNSPLASH_KEY@>'
28+
url: '<@UNSPLASH_URL@>'
3029
},
3130
signalingServerUrl: '<@SIGNALING_SERVER_URL@>',
3231
prismComponentsUrl: 'https://raw.githubusercontent.com/PrismJS/prism/886698d5b759ef46162a5723a2493f97c689dc94/components.json'

studio/src/global/app.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,7 @@ setupConfig({
2525
key: '<@TENOR_KEY@>'
2626
},
2727
unsplash: {
28-
url: 'https://api.unsplash.com/',
29-
key: '<@UNSPLASH_KEY@>'
28+
url: '<@UNSPLASH_URL@>'
3029
},
3130
signalingServerUrl: '<@SIGNALING_SERVER_URL@>',
3231
prismComponentsUrl: 'https://raw.githubusercontent.com/PrismJS/prism/886698d5b759ef46162a5723a2493f97c689dc94/components.json'

0 commit comments

Comments
 (0)