diff --git a/docs/api/routes/v1/deletedentity.md b/docs/api/routes/v1/deletedentity.md index f97c557..fb2afba 100644 --- a/docs/api/routes/v1/deletedentity.md +++ b/docs/api/routes/v1/deletedentity.md @@ -10,7 +10,7 @@ Returns deleted entities after lastChangedDeletedEntity cursor for the authentic | Param | Required | Type | Description | |-------|----------|------|-------------| -| `lastChangedDeletedEntity` | no | string | Sequential ID cursor of last processed tombstone | +| `lastChangedDeletedEntity` | no | string | Sequential ID cursor of last processed obituary | | `limit` | no | integer | Maximum number of deleted entities to return | ## Response `200` diff --git a/src/db/posterminal.js b/src/db/posterminal.js index d114c95..fe74703 100644 --- a/src/db/posterminal.js +++ b/src/db/posterminal.js @@ -115,9 +115,9 @@ export async function getProductList(params) { return store.posterminal.getProductList(params); } -export async function setMaxKnownTombstoneId(id, maxknowntombstoneid) { +export async function setMaxKnownObituaryId(id, maxknownobituaryid) { const store = await getStore(); - return store.posterminal.setMaxKnownTombstoneId(id, maxknowntombstoneid); + return store.posterminal.setMaxKnownObituaryId(id, maxknownobituaryid); } /** diff --git a/src/v1/routes/deletedentity.js b/src/v1/routes/deletedentity.js index 0cf253a..53bb5b6 100644 --- a/src/v1/routes/deletedentity.js +++ b/src/v1/routes/deletedentity.js @@ -22,7 +22,7 @@ const TYPE_MAP = { * name: lastChangedDeletedEntity * schema: * type: string - * description: Sequential ID cursor of last processed tombstone + * description: Sequential ID cursor of last processed obituary * - in: query * name: limit * schema: @@ -57,17 +57,17 @@ export async function handleDeletedEntity(req, res, next) { const cursor = Number(req.query.lastChangedDeletedEntity) || 0; const limit = Number(req.query.limit) || 200; - const tombstones = await getDeletedEntityList({ + const obituaries = await getDeletedEntityList({ posterminalId: posterminal.id, cursor, limit, }); res.json( - tombstones.map((t) => ({ - entityId: String(t.entityId), - entityType: TYPE_MAP[t.entityType?.toLowerCase()] ?? 0, - lastChanged: t.id, + obituaries.map((o) => ({ + entityId: String(o.entityId), + entityType: TYPE_MAP[o.entityType?.toLowerCase()] ?? 0, + lastChanged: o.id, })) ); } catch (err) {