Skip to content

Commit

Permalink
fix auth 400 error
Browse files Browse the repository at this point in the history
  • Loading branch information
yanagiragi committed Oct 28, 2019
1 parent 5076c24 commit ec141fe
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,19 @@ export default class PixivApp<CamelcaseKeys extends boolean = true> {
)
}

const local_time = new Date().toISOString()
const now_time = new Date()
const local_time = `${now_time.getUTCFullYear()}-${now_time.getUTCMonth() +
1}-${now_time.getUTCDate()}T${now_time
.getUTCHours()
.toString()
.padStart(2, '0')}:${now_time
.getUTCMinutes()
.toString()
.padStart(2, '0')}:${now_time
.getUTCSeconds()
.toString()
.padStart(2, '0')}+00:00`

const headers = {
'X-Client-Time': local_time,
'X-Client-Hash': crypto
Expand Down

0 comments on commit ec141fe

Please sign in to comment.