Skip to content
Snippets Groups Projects
Commit ff241ea5 authored by Vytor Calixto's avatar Vytor Calixto :space_invader:
Browse files

Add link to downloads

parent e7888fb6
No related branches found
No related tags found
1 merge request!116Release v1.0.0
Pipeline #
...@@ -44,6 +44,9 @@ let Download = new Schema({ ...@@ -44,6 +44,9 @@ let Download = new Schema({
}, },
expired: { expired: {
type: Boolean type: Boolean
},
link: {
type: String
} }
}); });
......
...@@ -36,6 +36,7 @@ downloadApp.get('/', passport.authenticate('bearer', {session: false}), (req, re ...@@ -36,6 +36,7 @@ downloadApp.get('/', passport.authenticate('bearer', {session: false}), (req, re
dl.size = cdn[i].size; dl.size = cdn[i].size;
dl.expired = cdn[i].expired; dl.expired = cdn[i].expired;
dl.updatedAt = cdn[i].lastAccess; dl.updatedAt = cdn[i].lastAccess;
dl.link = config.cdn.download + '/' + cdn[i]._id;
dl.save((err) => { dl.save((err) => {
if(err) log.error(err); if(err) log.error(err);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment