-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Auditability #4
Auditability #4
Conversation
@@ -78,6 +78,6 @@ describe('compatibility', () => { | |||
|
|||
const result = await assureValidNextOp(did, [indexedLegacy], nextOp) | |||
expect(result.nullified.length).toBe(0) | |||
expect(result.prev?.equals(legacyCid)) | |||
expect(result.prev?.equals(legacyCid)).toBeTruthy() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👀
👍 nice catch
@@ -48,7 +53,7 @@ export const createRouter = (ctx: AppContext): express.Router => { | |||
}) | |||
|
|||
// Get data for a DID document | |||
router.get('/data/:did', async function (req, res) { | |||
router.get('/:did/data', async function (req, res) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Big +1 on these changes!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yuppp
packages/server/src/routes.ts
Outdated
// Get operation log for a DID | ||
router.get('/:did/auditable', async function (req, res) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't want to overthink this name, but the fact that it's an adjective and the rest are nouns sort of piqued my attention. Only other idea I can think of is /:did/log/audit
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good point
honestly maybe just /:did/audit
packages/server/src/routes.ts
Outdated
}) | ||
|
||
// Get the most recent operation in the log for a DID | ||
router.get('/last/:did', async function (req, res) { | ||
router.get('/:did/last', async function (req, res) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In a similar line of thought re: /:did/log/audit
, I could also imagine calling this /:did/log/last
. Really not too hung-up on it, really just one final poke to make sure we like the naming conventions here!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
actually you're right i'll do those 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PLC just got a little comfier and cozier 👍
Co-authored-by: devin ivy <devinivy@gmail.com>
Adds two new routes
/export
which exports the entire PLC database as a series of jsonlines, where each line is an operation ordered bycreatedAt
time. This is paginated with a limit of 1000 lines per req/:did/auditable
which gives the auditable log for a user that includes timestamps & nullified operations