mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-10-07 18:46:38 +08:00
prompts
This commit is contained in:
parent
87e612c147
commit
34fbad9e9b
@ -82,13 +82,13 @@ async function fetchEN() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function main() {
|
async function main() {
|
||||||
Promise.all([fetchEN()])
|
Promise.all([fetchCN(), fetchTW(), fetchEN()])
|
||||||
.then(([en]) => {
|
.then(([cn, tw, en]) => {
|
||||||
fs.writeFile(FILE, JSON.stringify({en }));
|
fs.writeFile(FILE, JSON.stringify({ cn, tw, en }));
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
console.error("[Fetch] failed to fetch prompts");
|
console.error("[Fetch] failed to fetch prompts");
|
||||||
fs.writeFile(FILE, JSON.stringify({en: [] }));
|
fs.writeFile(FILE, JSON.stringify({ cn: [], tw: [], en: [] }));
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
console.log("[Fetch] saved to " + FILE);
|
console.log("[Fetch] saved to " + FILE);
|
||||||
|
Loading…
Reference in New Issue
Block a user