From d1a1b7dc947063aef5f8375a6a1e03246b272c84 Mon Sep 17 00:00:00 2001 From: HampusM Date: Wed, 18 Aug 2021 17:29:55 +0200 Subject: Implemented caching for certain API endpoints, Added documentation & made backend-fixes --- packages/server/src/routes/api/v1/repo/map.ts | 24 ------------------------ 1 file changed, 24 deletions(-) delete mode 100644 packages/server/src/routes/api/v1/repo/map.ts (limited to 'packages/server/src/routes/api/v1/repo/map.ts') diff --git a/packages/server/src/routes/api/v1/repo/map.ts b/packages/server/src/routes/api/v1/repo/map.ts deleted file mode 100644 index a544d1a..0000000 --- a/packages/server/src/routes/api/v1/repo/map.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { Commit } from "../../../../git/commit"; -import { LogCommit } from "api"; - -export async function commitMap(commit: Commit): Promise { - const stats = await commit.stats(); - - const is_signed = await commit.isSigned(); - - return { - id: commit.id, - author: { - name: commit.author().name, - email: commit.author().email, - fingerprint: await commit.author().fingerprint().catch(() => null) - }, - isSigned: is_signed, - signatureVerified: is_signed ? await commit.verifySignature().catch(() => false) : null, - message: commit.message, - date: commit.date, - insertions: stats.insertions, - deletions: stats.deletions, - files_changed: stats.files_changed - }; -} \ No newline at end of file -- cgit v1.2.3-18-g5258