Skip to content

Commit

Permalink
Add QRcode generation
Browse files Browse the repository at this point in the history
  • Loading branch information
yuneg11 committed Dec 8, 2019
1 parent 8077002 commit 436d211
Show file tree
Hide file tree
Showing 5 changed files with 253 additions and 9 deletions.
6 changes: 2 additions & 4 deletions src/backend/handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,8 @@ module.exports.itemSearchKeyword = async (event) => {
}
};

module.exports.imageUploadTest = async (event) => {
const re = await database.uploadImages("test/loc/", ["http://k.kakaocdn.net/dn/83BvP/bl20duRC1Q1/lj3JUcmrzC53YIjNDkqbWK/i_6piz1p.jpg",
"https://i.ibb.co/QntzYHt/Kakao-Talk-Photo-2019-12-06-16-36-08.jpg",
"https://i.ibb.co/jvZwwNM/Kakao-Talk-Photo-2019-12-06-16-36-12.jpg"]);
module.exports.qrcodeTest = async (event) => {
const re = await authenticator.generateQrcode("userId=awefoiewbuafwehweabu&itemId=eifbaif7382bvhdj&token=euhsnvjqifjekvne");
return builder.buildAWSResponse(re);
};

Expand Down
242 changes: 242 additions & 0 deletions src/backend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions src/backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"aws-sdk": "^2.585.0",
"mysql": "^2.17.1",
"nodemailer": "^6.4.0",
"qrcode": "^1.4.4",
"sync-request": "^6.1.0"
},
"devDependencies": {
Expand Down
6 changes: 3 additions & 3 deletions src/backend/serverless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,11 @@ functions:
- http:
path: item/search/keyword
method: post
imageUploadTest:
handler: handler.imageUploadTest
qrcodeTest:
handler: handler.qrcodeTest
events:
- http:
path: image
path: qrcode
method: post
test:
handler: handler.test
Expand Down
Loading

0 comments on commit 436d211

Please sign in to comment.