From 8d42b6f44ca5b0eeb54938e1cf9509d1f8294f00 Mon Sep 17 00:00:00 2001 From: HampusM Date: Thu, 29 Jul 2021 15:39:31 +0200 Subject: Refactored & improved the backend yet again --- packages/server/src/routes/repo.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'packages/server/src/routes/repo.ts') 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); -- cgit v1.2.3-18-g5258