Skip to content

Commit

Permalink
fix: replace named request param to wildcard matcher (#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
ntn-x2 authored Dec 17, 2021
1 parent 5971e52 commit 88d9858
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/consts.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/

// did
const URI_DID = '/1.0/identifiers/:did'
const URI_DID = '/1.0/identifiers/*'

module.exports = {
URI_DID
Expand Down
3 changes: 2 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ async function start() {
console.info('\n→ Received headers:')
console.info(JSON.stringify(req.headers, null, 2))
const { exportType, defaultExport, responseContentType } = processAcceptHeaders(req.headers.accept)
const { did } = req.params
// We can't use pattern matching as the DID might include '/' characters.
const did = req.params['0']
// Add queried DID to default export for deleted resolutions
defaultExport.id = did

Expand Down

0 comments on commit 88d9858

Please sign in to comment.