Skip to content

Commit 30f5cd9

Browse files
clean up
1 parent 8787d76 commit 30f5cd9

4 files changed

Lines changed: 13 additions & 4 deletions

File tree

config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"bucket_name":"image_api_307972859230",
44
"keys": {
55
"cloud_storage": {
6-
"path":"./keys/cloud_storage.json"
6+
"path":"./keys/cloudStorage.json"
77
}
88
}
99
}
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
/** GCP example for reference **/
1+
/** GCP example for reference
2+
* https://cloud.google.com/storage/docs/uploading-objects#storage-upload-object-nodejs
3+
**/
24

35
// Imports the Google Cloud client library
46
const {Storage} = require('@google-cloud/storage');

experiments/gcp/upload.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const config = require('./../config.json');
77
const {Storage} = require('@google-cloud/storage');
88
const storage = new Storage({
99
projectId: config.project_id,
10-
keyFilename: './../keys/cloud_storage.json'
10+
keyFilename: './../keys/cloudStorage.json'
1111
});
1212

1313
// Returns a Promise object which resolves to a stream.

index.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,14 @@ function getImage(req, res) {
110110

111111

112112
// Lambdas
113-
exports.image = (req, res) => {
113+
114+
/**
115+
* images - served as our /images webhook.
116+
* @param {[type]} req [description]
117+
* @param {[type]} res [description]
118+
* @return {[type]} [description]
119+
*/
120+
exports.images = (req, res) => {
114121
if(!res.body.urls) res.status(400).json({error:'noURLs', message:'No URLs were provided.'});
115122
let urls = res.body.urls;
116123
switch(req.method) {

0 commit comments

Comments
 (0)