fix: missing file added

v1.18.x
Julian Lam 4 years ago
parent 4152aa552e
commit ef10b6b70d

@ -0,0 +1,19 @@
'use strict';
define('topicThumbs', ['api'], function (api) {
const Thumbs = {};
Thumbs.get = id => api.get(`/topics/${id}/thumbs`, {});
Thumbs.delete = (id, path) => api.del(`/topics/${id}/thumbs`, {
path: path,
});
Thumbs.deleteAll = (id) => {
Thumbs.get(id).then((thumbs) => {
Promise.all(thumbs.map(thumb => Thumbs.delete(id, thumb.url)));
});
};
return Thumbs;
});
Loading…
Cancel
Save