From 108b469cbb09f911c9a52d4134a504d9b51ac30d Mon Sep 17 00:00:00 2001 From: HampusM Date: Wed, 11 Aug 2021 12:59:23 +0200 Subject: Implemented gpg signed commit support --- packages/server/src/routes/api/v1/repo/log.ts | 6 ++++-- packages/server/src/routes/api/v1/repo/map.ts | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) (limited to 'packages/server/src/routes/api') diff --git a/packages/server/src/routes/api/v1/repo/log.ts b/packages/server/src/routes/api/v1/repo/log.ts index a7d8dfa..cf53d6b 100644 --- a/packages/server/src/routes/api/v1/repo/log.ts +++ b/packages/server/src/routes/api/v1/repo/log.ts @@ -46,9 +46,11 @@ export default function(fastify: FastifyInstance, opts: FastifyPluginOptions, do const data: APICommit = { message: commit.message, author: { - name: commit.author.name, - email: commit.author.email + name: commit.author().name, + email: commit.author().email, + fingerprint: await commit.author().fingerprint().catch(() => null) }, + isSigned: await commit.isSigned(), date: commit.date, insertions: stats.insertions, deletions: stats.deletions, diff --git a/packages/server/src/routes/api/v1/repo/map.ts b/packages/server/src/routes/api/v1/repo/map.ts index a3d0aa8..0544e4f 100644 --- a/packages/server/src/routes/api/v1/repo/map.ts +++ b/packages/server/src/routes/api/v1/repo/map.ts @@ -6,9 +6,11 @@ export async function commitMap(commit: Commit): Promise { return { id: commit.id, author: { - name: commit.author.name, - email: commit.author.email + name: commit.author().name, + email: commit.author().email, + fingerprint: await commit.author().fingerprint().catch(() => null) }, + isSigned: await commit.isSigned(), message: commit.message, date: commit.date, insertions: stats.insertions, -- cgit v1.2.3-18-g5258