Fix Some stuff.

This commit is contained in:
yuanhau 2025-07-02 22:01:24 +08:00
parent 4983369219
commit fe9cb6e588
4 changed files with 29 additions and 27 deletions

View file

@ -44,9 +44,6 @@ Chatbot, which is chatbot for chatting about news articles, is currently not ava
### Server Downtime ### Server Downtime
Use https://status.yhw.tw/ for checking down time, most of the time it will be up, but sometimes it just won't updated to the latest feature & update. Use https://status.yhw.tw/ for checking down time, most of the time it will be up, but sometimes it just won't updated to the latest feature & update.
#### Archive:
I fixed most issues of the server, including the nameserver stuff, if you want to know how I fixed it, you can view how I fixed it [here](/server_fixes.md) or on [My broken blog](https://4-1-2.yuanhau.com/posts/)
### Scraping restrictions: ### Scraping restrictions:
As LINE Today only loads & put the image file via JS in the browser, node-fetch is not working (yes, this platform uses node-fetch as the only way to scrape stuff). If LINE today became more problematic of this platform, those APIs will no longer work & most of the things will just not work, as it requires LINE Today to NOT patch these node-fetch things. As LINE Today only loads & put the image file via JS in the browser, node-fetch is not working (yes, this platform uses node-fetch as the only way to scrape stuff). If LINE today became more problematic of this platform, those APIs will no longer work & most of the things will just not work, as it requires LINE Today to NOT patch these node-fetch things.
@ -62,6 +59,9 @@ This code is absolutly NOT designed to be spinned up at Vercel or Netlify, it ha
### The API returning outdated data from more than 5+ years: ### The API returning outdated data from more than 5+ years:
Here is the GitHub Issue: https://github.com/hpware/news-analyze/issues/2 Here is the GitHub Issue: https://github.com/hpware/news-analyze/issues/2
### Groq API not loading to .env for some reasons.
If the user did not load a GROQ api, the summerizing system will just fail outright. Fixing this rn.
## Why? ## Why?
We'll use this news article from May 7th 2025 as an example: We'll use this news article from May 7th 2025 as an example:

View file

@ -284,12 +284,12 @@ const translateFunction = () => {
}; };
</script> </script>
<template> <template>
<div v-if="translateLoading">
<div <div
v-if="translateLoading" class="flex flex-col bg-gray-200/50 text-black w-full h-full absolute inset-0 justify-center align-middle text-center z-[20] backdrop-blur-sm"
class="flex flex-col bg-gray-200/50 text-black w-full h-full fixed inset-0 justify-center align-middle text-center z-[20] backdrop-blur-sm"
> >
<!--Spinner from https://flowbite.com/docs/components/spinner/--> <!--Spinner from https://flowbite.com/docs/components/spinner/-->
<div role="status"> <div role="status" class="justify-center self-center text-center">
<svg <svg
aria-hidden="true" aria-hidden="true"
class="w-8 h-8 text-gray-200 animate-spin dark:text-gray-600 fill-blue-600" class="w-8 h-8 text-gray-200 animate-spin dark:text-gray-600 fill-blue-600"
@ -309,6 +309,7 @@ const translateFunction = () => {
</div> </div>
<div>Translating...</div> <div>Translating...</div>
</div> </div>
</div>
<div class="justify-center align-center text-center"> <div class="justify-center align-center text-center">
<!--Tabs--> <!--Tabs-->
<div <div

View file

@ -711,7 +711,7 @@ setInterval(async () => {
leave-active-class="animate__animated animate__fadeOutUp animate_fast03" leave-active-class="animate__animated animate__fadeOutUp animate_fast03"
> >
<div <div
class="m-2 p-2 bg-gray-800 shadow-lg w-fit rounded-[10px] z-[9999] selection:opacity-0 fixed top-[3em]" class="m-2 p-2 bg-gray-800 shadow-lg w-fit rounded-[10px] z-[99999] selection:opacity-0 fixed top-[3em]"
v-if="menuOpen" v-if="menuOpen"
> >
<!--Wait, I'm not using z-9998 this entire time? What?--> <!--Wait, I'm not using z-9998 this entire time? What?-->

View file

@ -20,6 +20,7 @@ export default defineEventHandler(async (event) => {
apiKey: doesTheUserHasACustomGroqApiAndWhatIsIt.customApi, apiKey: doesTheUserHasACustomGroqApiAndWhatIsIt.customApi,
}); });
} else { } else {
console.log(process.env.GROQ_API_KEY); // DEBUGGING ONLY!!! THIS ONLY CONTAINS THE .ENV KEYS NOT THE USER ONES
groqClient = new Groq({ groqClient = new Groq({
apiKey: process.env.GROQ_API_KEY, apiKey: process.env.GROQ_API_KEY,
}); });