Removed upsert from store releases, observing effects; fixes ? inserted as . Removed query from stored Dogfart URLs.

This commit is contained in:
2019-11-05 00:54:47 +01:00
parent 877fcb01ad
commit c466d791f5
4 changed files with 49 additions and 33 deletions

View File

@@ -0,0 +1,8 @@
'use strict';
// pick {photoLimit} photos evenly distributed photos from a set with {photoTotal} photos, return array of indexes starting at 1
function pluckPhotos(photoTotal, photoLimit) {
return [1].concat(Array.from({ length: photoLimit - 1 }, (value, index) => Math.floor((index + 1) * (photoTotal / (photoLimit - 1)))));
}
module.exports = pluckPhotos;