Skip to content

Commit

Permalink
docs: secure-our-serverless-apis.md (#743)
Browse files Browse the repository at this point in the history
* Update secure-our-serverless-apis.md

* docs: formatting

* docs: specify amplify version
- v6 api is different. tutorial was breaking as it's built on v5 of amplify

* Update secure-our-serverless-apis.md

---------

Co-authored-by: Jay <[email protected]>
  • Loading branch information
guidefari and jayair authored Nov 23, 2023
1 parent 6d10e59 commit 09e376d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 17 deletions.
2 changes: 1 addition & 1 deletion _chapters/configure-aws-amplify.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ To do this we'll be using a library called [AWS Amplify](https://github.com/aws/
{%change%} Run the following command **in the `packages/frontend/` directory**.

```bash
$ pnpm add --save aws-amplify
$ pnpm add --save aws-amplify@^5
```

This installs the NPM package and adds the dependency to the `package.json` of your React app..
Expand Down
20 changes: 4 additions & 16 deletions _chapters/secure-our-serverless-apis.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,23 +51,11 @@ Let's change that.
userId: event.requestContext.authorizer?.iam.cognitoIdentity.identityId,
```

{%change%} Do the same in the `packages/functions/src/get.ts`.
{%change%} Do the same in these files:

```typescript
userId: event.requestContext.authorizer?.iam.cognitoIdentity.identityId,
```

{%change%} And in the `packages/functions/src/update.ts`.

```typescript
userId: event.requestContext.authorizer?.iam.cognitoIdentity.identityId,
```

{%change%} In `packages/functions/src/delete.ts` as well.

```typescript
userId: event.requestContext.authorizer?.iam.cognitoIdentity.identityId,
```
- `packages/functions/src/get.ts`
- `packages/functions/src/update.ts`
- `packages/functions/src/delete.ts`

{%change%} In `packages/functions/src/list.ts` find this line instead.

Expand Down

0 comments on commit 09e376d

Please sign in to comment.