Created
July 3, 2019 21:31
-
-
Save kmaher9/e0cb0a91dbbc5e707c3f636c72766ec5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
exports.getFiles = async function (request, response) { | |
let files = await File.find({}) | |
if (!files) { | |
return response.status(404).json({ | |
"data": { | |
"message": "There are no uploaded files" | |
} | |
}) | |
} | |
return response.status(200).json({ | |
"data": { | |
"files": files | |
} | |
}) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment