Created
March 7, 2022 15:06
-
-
Save evankirkiles/de5eeafb41d179878dcf9d08a1a53195 to your computer and use it in GitHub Desktop.
MEDIUM: Run Cascade Deletion in REST API from client
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Auth, API } from "aws-amplify"; | |
// ... | |
const id = "<some-clothe-id>"; | |
const myInit = { | |
headers: { | |
Authorization: `Bearer ${(await Auth.currentSession()) | |
.getIdToken() | |
.getJwtToken()}`, | |
}, | |
}; | |
const resp = await API.del("<my-wardrobe-api>", `/clothe/${id}`, myInit); | |
// ... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment