Skip to content

Commit

Permalink
fix bookmark request method
Browse files Browse the repository at this point in the history
  • Loading branch information
kokororin committed Apr 15, 2020
1 parent f8f9799 commit effcb01
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,6 @@ export default class PixivApp<CamelcaseKeys extends boolean = true> {
return this.fetch('/v2/illust/bookmark/detail', { params })
}

// This endpoint doesn't exist
illustBookmarkAdd(id: number, params?: PixivParams): Promise<unknown> {
if (!id) {
return Promise.reject(new Error('illustId required'))
Expand All @@ -550,10 +549,9 @@ export default class PixivApp<CamelcaseKeys extends boolean = true> {
...params,
}

return this.fetch('/v2/illust/bookmark/add', { params })
return this.fetch('/v2/illust/bookmark/add', { data: params })
}

// This endpoint doesn't exist
illustBookmarkDelete(id: number, params?: PixivParams): Promise<unknown> {
if (!id) {
return Promise.reject(new Error('illustId required'))
Expand All @@ -562,7 +560,7 @@ export default class PixivApp<CamelcaseKeys extends boolean = true> {
illustId: id,
...params,
}
return this.fetch('/v1/illust/bookmark/delete', { params })
return this.fetch('/v1/illust/bookmark/delete', { data: params })
}

userBookmarkTagsIllust(
Expand Down

0 comments on commit effcb01

Please sign in to comment.