summaryrefslogtreecommitdiffstats
path: root/lib/image.js
diff options
context:
space:
mode:
authorWes Bos <wesbos@gmail.com>2017-10-27 10:10:49 -0400
committerWes Bos <wesbos@gmail.com>2017-10-27 10:10:49 -0400
commitacdfa2840f867e686471a8e9ac3f29353fab7dd1 (patch)
tree1a069ce11e145d9b286084221951272511debbdf /lib/image.js
parent6f44adb59d3542eb21e55e0aae789b1fcc7cf8f1 (diff)
hi
Diffstat (limited to 'lib/image.js')
-rw-r--r--lib/image.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/image.js b/lib/image.js
index 40045b3..5b6efb9 100644
--- a/lib/image.js
+++ b/lib/image.js
@@ -1,5 +1,6 @@
-// TODO: Put the project ID in a config file.
+import { imageEndpoint } from '../config';
+
export default function(image, width = 300, height = 300) {
- if(!image || !image.secret) return '';
- return `https://images.graph.cool/v1/cj5xz8szs28930145gct82bdj/${image.secret}/${width}x${height}`;
+ if (!image || !image.secret) return '';
+ return `${imageEndpoint}/${image.secret}/${width}x${height}`;
}