We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent af3f006 commit b6f1cf6Copy full SHA for b6f1cf6
src/getGist.ts
@@ -1,15 +1,21 @@
1
import request from './structures/request';
2
-import { GistResponse } from './types';
+import { GistResponse, ReqRet } from './types';
3
4
-export default async (id: string, token: string): Promise<GistResponse> => {
+export default async (
5
+ id: string,
6
+ token: string
7
+): Promise<ReqRet<GistResponse>> => {
8
return await request<GistResponse>(
9
`https://api.github.com/gists/${id}`,
10
token,
11
'GET',
12
{}
13
)
14
.then((response) => {
- return Promise.resolve(response);
15
+ return Promise.resolve({
16
+ data: response.data,
17
+ status: response.status,
18
+ });
19
})
20
.catch((err) => {
21
return Promise.reject(err);
0 commit comments