Update fetch-prompts.mjs

remove cn
This commit is contained in:
DirkSchlossmacher 2023-06-06 07:49:54 +02:00 committed by GitHub
parent e1827d51ad
commit 4014eb7bea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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);