Skip to content

Commit 75e3756

Browse files
authored
Fix patch when gist gets deleted #641 (#643)
1 parent 1c8e074 commit 75e3756

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/api/gists.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@ export async function create(filename, content) {
1818
}
1919

2020
export async function patch(gistId, filename, content) {
21-
const { deleted } = await axios.patch(`${baseUrl}/gists/${gistId}`, {
21+
const { data } = await axios.patch(`${baseUrl}/gists/${gistId}`, {
2222
filename,
2323
content,
2424
});
2525

26-
return deleted;
26+
return data.deleted;
2727
}
2828

2929
export async function del(gistId) {

0 commit comments

Comments
 (0)