Skip to content

Commit

Permalink
Correct type for arc.tables().db._doc
Browse files Browse the repository at this point in the history
Workaround for architect/functions#540.
  • Loading branch information
lpsinger committed Dec 17, 2022
1 parent c6e1963 commit daf3ee2
Show file tree
Hide file tree
Showing 3 changed files with 18,676 additions and 23,252 deletions.
4 changes: 3 additions & 1 deletion app/routes/user/endorsements.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {
ListUsersCommand,
ListUsersInGroupCommand,
} from '@aws-sdk/client-cognito-identity-provider'
import type { DynamoDBDocument } from '@aws-sdk/lib-dynamodb'
import { getUser } from '../__auth/user.server'
import { client } from './cognito.server'

Expand Down Expand Up @@ -191,7 +192,8 @@ export class EndorsementsServer {
},
}

await db._doc.delete(param).promise()
// FIXME: https://github.com/architect/functions/issues/540
await (db._doc as unknown as DynamoDBDocument).delete(param)
}

/**
Expand Down
Loading

0 comments on commit daf3ee2

Please sign in to comment.