Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
RedNotSus committed Nov 16, 2024
2 parents 0621783 + c81ee8c commit f1d8e24
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ app.post("/api/chat", async (req, res) => {
Authorization: `Bearer ${process.env.API_KEY}`,
"Content-Type": "application/json",
},
}
},
);
if (response.status === 429) {
switchModel();
Expand All @@ -102,7 +102,7 @@ app.post("/api/chat", async (req, res) => {
Authorization: `Bearer ${process.env.API_KEY}`,
"Content-Type": "application/json",
},
}
},
);
const aiResponse = response.data.choices[0].message.content;
conversation.push({ role: "assistant", content: aiResponse });
Expand Down Expand Up @@ -177,7 +177,7 @@ app.post("/api/signUp", async (req, res) => {
headers: {
"Content-Type": "application/x-www-form-urlencoded",
},
}
},
);

if (!captchaVerifyResponse.data.success) {
Expand All @@ -197,7 +197,7 @@ app.post("/api/signUp", async (req, res) => {
Authorization: process.env.workerAUTH,
"Content-Type": "application/json",
},
}
},
);

res.status(200).json(response.data);
Expand Down Expand Up @@ -226,7 +226,7 @@ app.post("/api/login", async (req, res) => {
Authorization: process.env.workerAUTH,
"Content-Type": "application/json",
},
}
},
);

res.status(200).json(response.data);
Expand All @@ -252,7 +252,7 @@ app.post("/api/checkPremium", async (req, res) => {
Authorization: process.env.workerAUTH,
"Content-Type": "application/json",
},
}
},
);

res.status(200).json(response.data);
Expand Down Expand Up @@ -280,7 +280,7 @@ app.post("/api/uploadSave", async (req, res) => {
Authorization: process.env.workerAUTH,
"Content-Type": "application/json",
},
}
},
);

res.status(200).json(response.data);
Expand All @@ -306,7 +306,7 @@ app.post("/api/readSave", async (req, res) => {
Authorization: process.env.workerAUTH,
"Content-Type": "application/json",
},
}
},
);

res.status(200).json(response.data);
Expand Down Expand Up @@ -354,7 +354,7 @@ async function fetchDataFromGithub(
res,
next,
baseUrl,
secondaryUrl = null
secondaryUrl = null,
) {
function isAFile(urlString) {
return urlString.trim().split("/").pop().length !== 0;
Expand Down

0 comments on commit f1d8e24

Please sign in to comment.