mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-10-09 03:26:38 +08:00
Update fetch-prompts.mjs
remove cn
This commit is contained in:
parent
e1827d51ad
commit
4014eb7bea
@ -62,12 +62,12 @@ async function fetchEN() {
|
||||
|
||||
async function main() {
|
||||
Promise.all([fetchCN(), fetchEN()])
|
||||
.then(([cn, en]) => {
|
||||
fs.writeFile(FILE, JSON.stringify({ cn, en }));
|
||||
.then(([en]) => {
|
||||
fs.writeFile(FILE, JSON.stringify({en }));
|
||||
})
|
||||
.catch((e) => {
|
||||
console.error("[Fetch] failed to fetch prompts");
|
||||
fs.writeFile(FILE, JSON.stringify({ cn: [], en: [] }));
|
||||
fs.writeFile(FILE, JSON.stringify({en: [] }));
|
||||
})
|
||||
.finally(() => {
|
||||
console.log("[Fetch] saved to " + FILE);
|
||||
|
Loading…
Reference in New Issue
Block a user