diff options
author | HampusM <hampus@hampusmat.com> | 2021-07-29 15:39:31 +0200 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2021-07-29 15:59:52 +0200 |
commit | 8d42b6f44ca5b0eeb54938e1cf9509d1f8294f00 (patch) | |
tree | b3bae9c6160bb11436a7f2875f27191780156353 /packages/server/src/routes/repo.ts | |
parent | 4f47dbfeb6edd984b2e912f00993db6e4eb2193d (diff) |
Refactored & improved the backend yet again
Diffstat (limited to 'packages/server/src/routes/repo.ts')
-rw-r--r-- | packages/server/src/routes/repo.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/server/src/routes/repo.ts b/packages/server/src/routes/repo.ts index ce81dcd..99c2295 100644 --- a/packages/server/src/routes/repo.ts +++ b/packages/server/src/routes/repo.ts @@ -62,14 +62,14 @@ export default function(fastify: FastifyInstance, opts: FastifyPluginOptions, do method: "GET", url: "/refs/tags/:tag", handler: async(req, reply) => { - const repository: Repository | BaseError = await Repository.open(opts.settings.base_dir, req.params.repo).catch(err => err); + const repository = await Repository.open(opts.config.settings.base_dir, req.params.repo).catch((err: BaseError) => err); if(repository instanceof BaseError) { reply.code(repository.code).send(repository.message); return; } - const tag = await Tag.lookup(repository, req.params.tag).catch(err => err); + const tag = await Tag.lookup(repository, req.params.tag).catch((err: BaseError) => err); if(tag instanceof BaseError) { reply.code(tag.code).send(tag.message); |