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 19, 2022
1 parent f790afc commit 03e5596
Show file tree
Hide file tree
Showing 3 changed files with 3,048 additions and 1,553 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 03e5596

Please sign in to comment.