This commit is contained in:
seb
2026-10-22 14:39:46 +02:00
parent a27f507138
commit 36a135011f
3 changed files with 9 additions and 9 deletions

View File

@@ -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`

View File

@@ -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);
}
/**

View File

@@ -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) {