@adobe/spacecat-shared-data-access 1.1.5 → 1.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
# [@adobe/spacecat-shared-data-access-v1.1.6](https://github.com/adobe-rnd/spacecat-shared/compare/@adobe/spacecat-shared-data-access-v1.1.5...@adobe/spacecat-shared-data-access-v1.1.6) (2023-12-05)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* use getItem for latest audit ([#35](https://github.com/adobe-rnd/spacecat-shared/issues/35)) ([6e4a87e](https://github.com/adobe-rnd/spacecat-shared/commit/6e4a87ea2d515f632b34278a8cc1ffd51d692a16))
|
|
7
|
+
|
|
1
8
|
# [@adobe/spacecat-shared-data-access-v1.1.5](https://github.com/adobe-rnd/spacecat-shared/compare/@adobe/spacecat-shared-data-access-v1.1.4...@adobe/spacecat-shared-data-access-v1.1.5) (2023-12-05)
|
|
2
9
|
|
|
3
10
|
|
package/package.json
CHANGED
|
@@ -151,17 +151,12 @@ export const getLatestAuditForSite = async (
|
|
|
151
151
|
siteId,
|
|
152
152
|
auditType,
|
|
153
153
|
) => {
|
|
154
|
-
const latestAudit = await dynamoClient.
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
ExpressionAttributeValues: {
|
|
158
|
-
':siteId': siteId,
|
|
159
|
-
':auditType': `${auditType}`,
|
|
160
|
-
},
|
|
161
|
-
Limit: 1,
|
|
154
|
+
const latestAudit = await dynamoClient.getItem(config.tableNameLatestAudits, {
|
|
155
|
+
siteId,
|
|
156
|
+
auditType,
|
|
162
157
|
});
|
|
163
158
|
|
|
164
|
-
return latestAudit
|
|
159
|
+
return latestAudit ? AuditDto.fromDynamoItem(latestAudit) : null;
|
|
165
160
|
};
|
|
166
161
|
|
|
167
162
|
/**
|