Skip to content

Commit

Permalink
Fix gist backup error (#324)
Browse files Browse the repository at this point in the history
  • Loading branch information
sheepzh committed Nov 1, 2024
1 parent 4991d06 commit a70b244
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/api/gist.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ async function post<T, R>(token: string, uri: string, body?: R): Promise<T> {
}
})
const result = await response.json()
if (response.status === 200) {
const { status } = response
if (status >= 200 && status < 300) {
// Clear cache if success to request
GET_CACHE.clear()
return result as T
Expand Down

0 comments on commit a70b244

Please sign in to comment.