| 12345678910111213141516171819202122232425262728 |
- const files = [{
- id: 'jztnl975x6tqwjxnra',
- name: '$9O$UF[1[(@FQ)DM~)VRO8E.png',
- path: "$9O$UF[1[(@FQ)DM~)VRO8E.png",
- size: 5629
- }, {
- id: 'jztnlw2rgdhqcfscoa',
- name: '$%Z(E8G$S%DJHA6G`XJEVK4.png',
- path: "$%Z(E8G$S%DJHA6G`XJEVK4.png",
- size: 86213
- }]
- module.exports = function(request, response) {
- var query = request.query,
- ids = query.ids,
- idArr = ids.split(';'),
- result = [];
-
- idArr.forEach(function(id) {
- let f = files.find(file => file.id === id);
- if(f) {
- result.push(f);
- }
- });
- return result;
- };
|