diff options
author | HampusM <hampus@hampusmat.com> | 2021-06-21 14:12:05 +0200 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2021-06-21 14:12:05 +0200 |
commit | 2ceb6e8c986f7e77f0d74aaac065fc969d39fc3e (patch) | |
tree | 1706f74d2b88c98fa533f71581e66b4cb46e055b /packages/server/src/app.ts | |
parent | b2cab411ac27e47d5b44f247be7d4323f1550b77 (diff) |
Added branch & tag API endpoints, tag tarball downloading and added handlers to the api
Diffstat (limited to 'packages/server/src/app.ts')
-rw-r--r-- | packages/server/src/app.ts | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/packages/server/src/app.ts b/packages/server/src/app.ts index d5f63b0..263703b 100644 --- a/packages/server/src/app.ts +++ b/packages/server/src/app.ts @@ -117,6 +117,15 @@ fastify.route({ } }); +fastify.route({ + method: "GET", + url: "/:repo([a-zA-Z0-9\\.\\-_]+)/refs/tags/:tag", + handler: (req, reply) => { + const params: any = req.params; + git.downloadTagArchive(params.repo, params.tag, reply); + } +}); + fastify.listen(settings.port, settings.host, (err: Error, addr: string) => { if(err) { console.error(err); |