diff options
Diffstat (limited to 'src/api/v1.js')
-rw-r--r-- | src/api/v1.js | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/api/v1.js b/src/api/v1.js index 3a6f7ea..743be09 100644 --- a/src/api/v1.js +++ b/src/api/v1.js @@ -108,8 +108,19 @@ module.exports = function (fastify, opts, done) } }); + fastify_repo.route({ + method: "GET", + path: "/tree", + handler: async (req, reply) => + { + const tree = await git.getTree(opts.config.settings.base_dir, req.params.repo); + + reply.send({ data: tree }); + } + }); + done_repo(); }, { prefix: "/repos/:repo" }); done(); -}
\ No newline at end of file +};
\ No newline at end of file |