u
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user