diff --git a/README.md b/README.md index 652a0d5..7d87135 100644 --- a/README.md +++ b/README.md @@ -96,6 +96,8 @@ Use this form: https://yhw.tw/SaBta 在 LINE 自己的口中 「LINE TODAY是消費者獲取各式知識資訊的重要入⼝」,當然可以讓新聞媒體給他新聞賺錢,所以很多Article多會在 LINE Today 上 ## FREE APIs: +API Info: https://news.yuanhau.com/apis + If you just want to throw to an LLM and tell it to do stuff, here is the endpoints (w/cors, but I (hpware) has given permission for you to use it for free.), you are welcome to build something better than mine. Just credit me :) thx https://news.yuanhau.com/api/tabs for fetching Tabs diff --git a/pages/apis.vue b/pages/apis.vue index bde7b68..40c5233 100644 --- a/pages/apis.vue +++ b/pages/apis.vue @@ -1,55 +1,88 @@ diff --git a/server/api/user/login.ts b/server/api/user/login.ts index 2a4e5ec..af2eaa0 100644 --- a/server/api/user/login.ts +++ b/server/api/user/login.ts @@ -25,8 +25,6 @@ export default defineEventHandler(async (event) => { error: "INVALD_USER_ACCOUNT", }; } - // Server side hashing - // Check if user exists, if not, create a user try { console.log(username); @@ -47,7 +45,6 @@ export default defineEventHandler(async (event) => { }; } const newToken = uuidv4(); - //const newToken64 = atob(newToken); return { user: fetchUserInfo, token: newToken, @@ -64,14 +61,13 @@ export default defineEventHandler(async (event) => { } } const newToken = uuidv4(); - const newToken64 = btoa(newToken); const fetchUserInfoAgain = await sql` select * from users where username = ${username}`; - /*await sql` + await sql` INSERT INTO usertokens (user, token) - VALUES (${fetchUserInfo[0].username}, ${newToken64}) - `;*/ + VALUES ('${fetchUserInfo[0].username}', '${newToken}') + `; return { user: fetchUserInfoAgain, token: newToken,