Skip to content

Commit

Permalink
feat: add service DID to home and version endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
Alan Shaw committed Apr 24, 2024
1 parent a5a042b commit d891f48
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions packages/lambda/src/content-claims.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,9 @@ export const handler = Sentry.AWSLambda.wrapHandler(_handler)
*/
export const getVersion = () => {
const { NAME: name, VERSION: version, COMMIT: commit, STAGE: env, REPO: repo } = process.env
const body = JSON.stringify({ name, version, repo, commit, env })
const did = signer.did()
const publicKey = signer.toDIDKey()
const body = JSON.stringify({ name, version, did, publicKey, repo, commit, env })
return { statusCode: 200, headers: { 'Content-Type': json }, body }
}

Expand All @@ -71,7 +73,9 @@ export const getVersion = () => {
export const getHome = () => {
const { NAME, VERSION, STAGE, REPO } = process.env
const env = STAGE === 'prod' ? '' : `(${STAGE})`
const body = `⁂ ${NAME} v${VERSION} ${env}\n- ${REPO}`
const did = signer.did()
const publicKey = signer.toDIDKey()
const body = `⁂ ${NAME} v${VERSION} ${env}\n- ${REPO}\n- ${did}\n- ${publicKey}`
return { statusCode: 200, headers: { 'Content-Type': text }, body }
}

Expand Down

0 comments on commit d891f48

Please sign in to comment.