docs: Clean up `padCreate`, `padUpdate` hook docs

This commit is contained in:
Richard Hansen 2022-02-16 22:10:04 -05:00
parent a27b400073
commit a8c061154e
1 changed files with 17 additions and 14 deletions

View File

@ -204,15 +204,16 @@ Things in context:
This hook gets called when the access to the concrete pad is being checked.
Return `false` to deny access.
## padCreate
Called from: src/node/db/Pad.js
## `padCreate`
Things in context:
Called from: `src/node/db/Pad.js`
1. pad - the pad instance
2. author - the id of the author who created the pad
Called when a new pad is created.
This hook gets called when a new pad was created.
Context properties:
* `pad`: The Pad object.
* `author`: The ID of the author who created the pad.
## `padLoad`
@ -224,17 +225,19 @@ Context properties:
* `pad`: The Pad object.
## padUpdate
Called from: src/node/db/Pad.js
## `padUpdate`
Things in context:
Called from: `src/node/db/Pad.js`
1. pad - the pad instance
2. author - the id of the author who updated the pad
3. revs - the index of the new revision
4. changeset - the changeset of this revision (see [Changeset Library](#index_changeset_library))
Called when an existing pad is updated.
This hook gets called when an existing pad was updated.
Context properties:
* `pad`: The Pad object.
* `author`: The ID of the author who updated the pad.
* `revs`: The index of the new revision.
* `changeset`: The changeset of this revision (see [Changeset
Library](#index_changeset_library)).
## padCopy
Called from: src/node/db/Pad.js