Skip to content

Instantly share code, notes, and snippets.

@reusee
Created June 9, 2019 15:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save reusee/6134dbca5ac6458ac549a7071e90e743 to your computer and use it in GitHub Desktop.
Save reusee/6134dbca5ac6458ac549a7071e90e743 to your computer and use it in GitHub Desktop.
batch delete zhihu answers
fetch('/api/v4/members/aaaaaaa/answers').then(resp => { return resp.json() }).then(j => { for (const row of j.data) { fetch('/api/v4/answers/' + row.id, { method: 'DELETE', credentials: 'same-origin' } ).then(resp => { console.log(resp) }) } })
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment