doc: add fetchImageData method

This commit is contained in:
Leon Xu committed 2022-05-01 18:41:52 -07:00
1 parent 79c3fd4a02
commit 492a699216
1 file changed
+11 -1
+11 -1
View File
@@ -2,6 +2,7 @@
import ncovChinaData from "../models/ncovChinaData.js";
import ChinaNcovData from '../models/ChinaData.js';
import WorldNcovData from "../models/WorldData.js";
import ImageData from "../models/ImageData.js";
// Fetch China Data method
export const fetchAllChinaData = (req, res) => {
@@ -37,4 +38,13 @@ export const fetchWorldData = (req, res) => {
}).catch(error => {
res.status(404).json({ message: error });
});
};
};
// Fetch Image Data
export const fetchImageData = (req, res) => {
ImageData.findById('625791053ac996de2bdbb3ba').then(result => {
res.send(result);
}).catch(error => {
res.status(404).json({ message: error });
})
}