Skip to content

Commit

Permalink
Integrate Changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Viserion77 authored Mar 10, 2024
2 parents 2d9ddb6 + 2e6307e commit f058156
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "adapcon-utils-js",
"version": "1.2.0",
"version": "1.2.1",
"description": "Utils library for Javascript",
"keywords": [],
"author": {
Expand Down
6 changes: 3 additions & 3 deletions src/dao/dynamo/dao.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@ const documentInstance = DynamoDBDocument.from(dynamoInstance, {
marshallOptions: { removeUndefinedValues: true }
})

const get = async<T> ({
const get = async<T>({
params,
fields = []
}: { params: GetCommandInput, fields?: string[] }): Promise<T| undefined> => {
}: { params: GetCommandInput, fields?: string[] }): Promise<T | undefined> => {
const command = new GetCommand({ ...params, ...mountProjectionExpression({ fields }) })

const { Item } = await documentInstance.send(command) as { Item: T }
const { Item } = await documentInstance.send(command) as Omit<QueryCommandOutput, 'Item'> & { Item: T } ?? {}
return Item
}

Expand Down

0 comments on commit f058156

Please sign in to comment.