Skip to content

Commit fc3c8cb

Browse files
committed
Create deleteGist.ts
1 parent 6cbaa9d commit fc3c8cb

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

src/deleteGist.ts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import request from "./structures/request";
2+
3+
export default async (
4+
id: string,
5+
token: string
6+
): Promise<{}> => {
7+
return await request<{}>(
8+
`https://api.github.com/gists/${id}`,
9+
token,
10+
"DELETE",
11+
{}
12+
)
13+
.then((response) => {
14+
return Promise.resolve(response);
15+
})
16+
.catch((err) => {
17+
return Promise.reject(err);
18+
});
19+
};

0 commit comments

Comments
 (0)