You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
473 B
17 lines
473 B
11 years ago
|
"use strict";
|
||
|
|
||
8 years ago
|
export = (req, res) => {
|
||
8 years ago
|
const options = {
|
||
8 years ago
|
"branch": `/refs/heads/${req.params.branch}`,
|
||
|
"branchName": req.params.branch,
|
||
|
"file": req.params[0],
|
||
|
"owner": req.params.owner,
|
||
|
"reponame": req.params.reponame,
|
||
|
"rev": req.params.rev
|
||
8 years ago
|
};
|
||
11 years ago
|
|
||
8 years ago
|
const pathParts = [req.app.get("releasepath"), options.owner, options.reponame, options.branch, options.rev, options.file];
|
||
|
|
||
|
res.sendfile(pathParts.join("/"));
|
||
11 years ago
|
};
|