in provision/lambda/history.ts [58:82]
time: formatDate(r.get('metadata')!.get('txTime')!.toString()),
hash: r.get('hash'),
data: r.get('data'),
};
});
};
exports.handler = async (event: lambda.APIGatewayProxyEvent): Promise<lambda.APIGatewayProxyResult> => {
const _type = queryParams('type', event) || 'json';
const scan = queryParams('scan', event) || 'documentId';
const id = Number(event.pathParameters.id);
const documentId = await fetchDocumentId(id);
let history: dom.Value[];
switch (scan) {
case 'documentId':
history = await fetchHistory(documentId);
break;
case 'full':
// Try to find history of deleted item by full scanning
history = await fetchHistoryFull(id);
break;
default:
return {