Skip to content
This repository has been archived by the owner on Sep 29, 2023. It is now read-only.

Commit

Permalink
clean code
Browse files Browse the repository at this point in the history
  • Loading branch information
wdzeng committed Aug 26, 2022
1 parent 703dc5c commit 807f5fc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
5 changes: 4 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"yaml.schemas": {
"https://json.schemastore.org/github-workflow.json": "file:///home/hyperbola/repo/pinkoi-coins-bot/.github/workflows/build.yml"
}
},
"cSpell.words": [
"pinkoi"
]
}
9 changes: 3 additions & 6 deletions src/pinkoi-bot.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
// cspell:ignore isobject
// cspell:ignore successed

import axios, { AxiosError, AxiosResponse } from 'axios'
import isobject from 'isobject'
import log from 'loglevel'
import log from 'loglevel' // c-spell: ignore loglevel
import { FavList, InMissionPeriod, PinkoiResponse, PinkoiValidResponse, Redeem, Sign, SignResult, User, WeeklyMission } from './types'
import { sleep } from './util'

Expand Down Expand Up @@ -204,7 +201,7 @@ export default class PinkoiBot {

// Delete the list along with the product
url = 'https://www.pinkoi.com/apiv3/favlist/delete'
body = { favlist_id: favListId, unfav_all: true }
body = { favlist_id: favListId, unfav_all: true } // c-spell: ignore unfav
response = await axios.post(url, body, { headers })
validatePinkoiResponse(response)

Expand Down Expand Up @@ -296,7 +293,7 @@ export default class PinkoiBot {
const result = response.data
log.debug(JSON.stringify(result))

if (result.result[0].successed !== true) {
if (result.result[0].successed !== true) { // c-spell: ignore successed
if (process.env['STRICT']) {
throw new Error('mission not solved')
}
Expand Down

0 comments on commit 807f5fc

Please sign in to comment.