mirror of
https://github.com/ourongxing/newsnow.git
synced 2025-01-19 03:09:14 +08:00
fix: wrong bindingName
This commit is contained in:
parent
13a32db931
commit
de644ed1b7
@ -37,7 +37,7 @@ if (process.env.VERCEL) {
|
||||
default: {
|
||||
connector: "cloudflare-d1",
|
||||
options: {
|
||||
bindingName: "NEWSNOW_DEV",
|
||||
bindingName: "NEWSNOW_DB",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
@ -49,7 +49,6 @@ export async function getCacheTable() {
|
||||
try {
|
||||
// 如果没有数据库,这里不会报错,只会在第一次访问的时候报错
|
||||
const db = useDatabase()
|
||||
if (process.env.CF_PAGES_BRANCH && process.env.CF_PAGES_BRANCH !== "main") return
|
||||
if (process.env.NODE_ENV && process.env.NODE_ENV !== "production") return
|
||||
const cacheTable = new Cache(db)
|
||||
if (process.env.INIT_TABLE !== "false") await cacheTable.init()
|
||||
|
Loading…
x
Reference in New Issue
Block a user