Merge branch 'develop'

This commit is contained in:
Alice Gaudon 2020-11-16 17:20:07 +01:00
commit 8efd9577e1
2 changed files with 14 additions and 10 deletions

View File

@ -1,6 +1,6 @@
{
"name": "eternae.ink.update",
"version": "1.0.1",
"version": "1.0.2",
"description": "A simple redirection to serve a gitea instance's repositories' latest release files as an http file server. (302 redirections)",
"repository": "https://eternae.ink/arisu/update.eternae.ink",
"author": "Alice Gaudon <alice@gaudon.pro>",

View File

@ -24,6 +24,7 @@ export default class GiteaRepoLatestReleaseController extends Controller {
data += c;
});
r.on('end', () => {
try {
const assets = JSON.parse(data)[0].assets;
if (file) {
@ -37,6 +38,9 @@ export default class GiteaRepoLatestReleaseController extends Controller {
log.debug('List files');
return res.render('list-files', {assets: assets});
}
} catch (e) {
return next(e);
}
});
}).on('error', err => {
log.error(err);