its still fucked but etyd.cc will work now

This commit is contained in:
Enstrayed
2024-09-24 23:15:23 -07:00
parent 5f1181476d
commit 0bf467a1c8
7 changed files with 169 additions and 161 deletions

View File

@@ -7,7 +7,9 @@ import { globalConfig } from "../index.js"
* @returns True for successful authentication and authorization, false if either fail
*/
async function checkToken(token,scope) {
return await fetch(`${globalConfig.couchdbHost}/auth/sessions`).then(fetchRes => {
return await fetch(`${process.env.API_DBHOST}/auth/sessions`, {
headers: { "Authorization": `Basic ${btoa(process.env.API_DBCRED)}`}
}).then(fetchRes => {
return fetchRes.json().then(dbRes => {