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() {
|
||||
Promise.all([fetchEN()])
|
||||
.then(([en]) => {
|
||||
fs.writeFile(FILE, JSON.stringify({en }));
|
||||
Promise.all([fetchCN(), fetchTW(), fetchEN()])
|
||||
.then(([cn, tw, en]) => {
|
||||
fs.writeFile(FILE, JSON.stringify({ cn, tw, en }));
|
||||
})
|
||||
.catch((e) => {
|
||||
console.error("[Fetch] failed to fetch prompts");
|
||||
fs.writeFile(FILE, JSON.stringify({en: [] }));
|
||||
fs.writeFile(FILE, JSON.stringify({ cn: [], tw: [], en: [] }));
|
||||
})
|
||||
.finally(() => {
|
||||
console.log("[Fetch] saved to " + FILE);
|
||||
|
Loading…
Reference in New Issue
Block a user