Skip to content

Commit

Permalink
fix: 修复语雀客户端报错问题
Browse files Browse the repository at this point in the history
  • Loading branch information
terwer committed Aug 1, 2023
1 parent 41b5686 commit 1d72fff
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 9 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
"zhi-blog-api": "^1.20.1",
"zhi-common": "^1.11.5",
"zhi-device": "^2.3.0",
"zhi-fetch-middleware": "^0.1.20",
"zhi-fetch-middleware": "^0.2.5",
"zhi-github-middleware": "^0.1.2",
"zhi-lib-base": "^0.4.2",
"zhi-siyuan-api": "^1.29.0",
Expand Down
15 changes: 10 additions & 5 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion src/adaptors/api/yuque/adaptor/yuqueApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import { CommonFetchClient } from "zhi-fetch-middleware"
import { createAppLogger } from "~/src/utils/appLogger.ts"
import { ObjectUtil } from "zhi-common"
import { isDev } from "~/src/utils/constants.ts"

/**
* 语雀API
Expand All @@ -50,7 +51,7 @@ export class YuqueApi {
middlewareUrl?: string
) {
this.logger = createAppLogger("yuque-api")
this.commonFetchClient = new CommonFetchClient(appInstance, baseUrl)
this.commonFetchClient = new CommonFetchClient(appInstance, baseUrl, middlewareUrl, isDev)
this.baseUrl = baseUrl
this.blogid = blogid
this.username = username
Expand Down
4 changes: 2 additions & 2 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ const args = minimist(process.argv.slice(2))
const debugMode = false
const isServe = process.env.IS_SERVE
const isWatch = args.watch || args.w || false
// const isDev = isServe || isWatch || debugMode
const isDev = false
const isDev = isServe || isWatch || debugMode
// const isDev = false
const isWindows = process.platform === "win32"
let devDistDir = "/Users/terwer/Documents/mydocs/SiYuanWorkspace/test/data/plugins/siyuan-plugin-publisher"
// let devDistDir = "/Users/terwer/Documents/mydocs/SiYuanWorkspace/public/data/plugins/siyuan-plugin-publisher"
Expand Down

0 comments on commit 1d72fff

Please sign in to comment.