We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 66f41d5 commit 1a80ac5Copy full SHA for 1a80ac5
src/api/gists.js
@@ -13,7 +13,7 @@ export async function create(content) {
13
content,
14
});
15
16
- return res.data.id;
+ return res.data.data.id;
17
}
18
19
export async function patch(gistId, content) {
src/components/EditorHeader/Modal/Share.jsx
@@ -69,8 +69,8 @@ export default function Share({ title, setModal }) {
69
try {
70
setLoading(true);
71
if (!gistId || gistId === "") {
72
- const res = await create(diagramToString());
73
- setGistId(res.data.id);
+ const id = await create(diagramToString());
+ setGistId(id);
74
} else {
75
await patch(gistId, diagramToString());
76
0 commit comments