Switch from send to redirect for doggies (#54)

* Update dogs.js

* Update dogs.js

* Update dogs.js
This commit is contained in:
Sam Poder 2020-11-06 22:45:29 +08:00 committed by GitHub
parent 4024c137b0
commit ac4f8de764

View file

@ -5,6 +5,6 @@ export default async (req, res) => {
.then(r => r.json())
.catch(err => res.status(400).send(err))
const file = fileList.files[0].url_private
res.status(200).send(file)
const file = fileList.files ? fileList.files[0].url_private : 'https://files.slack.com/files-pri/T0266FRGM-F01DYH13S1X/image_from_ios.jpg?pub_secret=132dcdb6ab'
res.redirect(file)
}