From 1e5309e7f842491a24e4c7a61ce1f69b695dfe17 Mon Sep 17 00:00:00 2001 From: HampusM Date: Wed, 18 Aug 2021 18:39:50 +0200 Subject: Cleaned up backend routes's imports --- packages/server/src/routes/api/v1/repo/branches.ts | 6 +++--- packages/server/src/routes/api/v1/repo/index.ts | 10 +++++----- packages/server/src/routes/api/v1/repo/log.ts | 6 +++--- 3 files changed, 11 insertions(+), 11 deletions(-) (limited to 'packages/server/src/routes/api/v1/repo') diff --git a/packages/server/src/routes/api/v1/repo/branches.ts b/packages/server/src/routes/api/v1/repo/branches.ts index f709f4d..84ca003 100644 --- a/packages/server/src/routes/api/v1/repo/branches.ts +++ b/packages/server/src/routes/api/v1/repo/branches.ts @@ -1,7 +1,7 @@ import { FastifyPluginCallback } from "fastify"; -import { sources } from "../../../../cache"; -import { Branch } from "../../../../git/branch"; -import { FastifyPluginOptions, Route } from "../../../../types/fastify"; +import { sources } from "cache"; +import { Branch } from "git/branch"; +import { FastifyPluginOptions, Route } from "types/fastify"; import { getBranch, getBranches } from "../data"; const branches: FastifyPluginCallback = (fastify, opts, done) => { diff --git a/packages/server/src/routes/api/v1/repo/index.ts b/packages/server/src/routes/api/v1/repo/index.ts index f8e01d3..bc66b10 100644 --- a/packages/server/src/routes/api/v1/repo/index.ts +++ b/packages/server/src/routes/api/v1/repo/index.ts @@ -1,15 +1,15 @@ -import { CoolFastifyRequest, Route, FastifyPluginOptions } from "../../../../types/fastify"; +import { CoolFastifyRequest, Route, FastifyPluginOptions } from "types/fastify"; import { FastifyInstance, FastifyPluginCallback } from "fastify"; -import { Repository } from "../../../../git/repository"; -import { BaseTreeEntry, BlobTreeEntry, TreeEntry } from "../../../../git/tree_entry"; +import { Repository } from "git/repository"; +import { BaseTreeEntry, BlobTreeEntry, TreeEntry } from "git/tree_entry"; import { basename } from "path"; import branches from "./branches"; import log from "./log"; import { verifyRepoName } from "../../util"; import { Tree as APITree, TreeEntry as APITreeEntry } from "api"; -import { ServerError } from "../../../../git/error"; +import { ServerError } from "git/error"; import { getLogCommits, getTags } from "../data"; -import { sources } from "../../../../cache"; +import { sources } from "cache"; declare module "fastify" { interface FastifyRequest { diff --git a/packages/server/src/routes/api/v1/repo/log.ts b/packages/server/src/routes/api/v1/repo/log.ts index 7ad1e11..019f579 100644 --- a/packages/server/src/routes/api/v1/repo/log.ts +++ b/packages/server/src/routes/api/v1/repo/log.ts @@ -1,7 +1,7 @@ import { FastifyPluginCallback } from "fastify"; -import { sources } from "../../../../cache"; -import { Commit } from "../../../../git/commit"; -import { Route, FastifyPluginOptions } from "../../../../types/fastify"; +import { sources } from "cache"; +import { Commit } from "git/commit"; +import { Route, FastifyPluginOptions } from "types/fastify"; import { verifySHA } from "../../util"; import { getCommit, getLogCommits } from "../data"; -- cgit v1.2.3-18-g5258