diff options
author | HampusM <hampus@hampusmat.com> | 2021-08-12 15:37:30 +0200 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2021-08-12 15:37:30 +0200 |
commit | d41b27f43335cfb1a8ff49aeb121f992332429cf (patch) | |
tree | 93b6e1ec9b292c3d80ee1a538d0e729612148052 /packages/server/src/routes/repo.ts | |
parent | 30f0b2ee1f494be1786280040fb47ec18bde8a6d (diff) |
Cleaned up the settings implementation & renamed base_dir project-wide to git_dir
Diffstat (limited to 'packages/server/src/routes/repo.ts')
-rw-r--r-- | packages/server/src/routes/repo.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/packages/server/src/routes/repo.ts b/packages/server/src/routes/repo.ts index 99c2295..43d89d2 100644 --- a/packages/server/src/routes/repo.ts +++ b/packages/server/src/routes/repo.ts @@ -35,7 +35,7 @@ export default function(fastify: FastifyInstance, opts: FastifyPluginOptions, do return; } - const repository = await Repository.open(opts.config.settings.base_dir, req.params.repo); + const repository = await Repository.open(opts.config.settings.git_dir, req.params.repo); repository.HTTPconnect(req, reply); } }); @@ -44,7 +44,7 @@ export default function(fastify: FastifyInstance, opts: FastifyPluginOptions, do method: "POST", url: "/git-upload-pack", handler: async(req, reply) => { - const repository = await Repository.open(opts.config.settings.base_dir, req.params.repo); + const repository = await Repository.open(opts.config.settings.git_dir, req.params.repo); repository.HTTPconnect(req, reply); } }); @@ -62,7 +62,7 @@ export default function(fastify: FastifyInstance, opts: FastifyPluginOptions, do method: "GET", url: "/refs/tags/:tag", handler: async(req, reply) => { - const repository = await Repository.open(opts.config.settings.base_dir, req.params.repo).catch((err: BaseError) => err); + const repository = await Repository.open(opts.config.settings.git_dir, req.params.repo).catch((err: BaseError) => err); if(repository instanceof BaseError) { reply.code(repository.code).send(repository.message); |