fix: Missing Env Variable in Extension

This commit is contained in:
DESKTOP-RTLN3BA\$punk 2024-08-12 07:13:11 -07:00
parent affd4ccc08
commit 24a5e9faf4
3 changed files with 4 additions and 3 deletions

BIN
extension/dist.zip Normal file

Binary file not shown.

View file

@ -1,2 +1,2 @@
export const API_SECRET_KEY = "surfsense"
export const BACKEND_URL = "http://127.0.0.1:8000"
export const API_SECRET_KEY = "SURFSENSENGvKkWM2VwcIlfFTOz3HR7zB0E4pHFM4llbT3BlbkFJJ0Ood1rgtXbvEXq6Lf"
export const BACKEND_URL = "http://18.227.190.91:8000"

View file

@ -1,6 +1,7 @@
import React, { useState } from "react";
import { goTo } from "react-chrome-extension-router";
import { Popup } from "../popup";
import { BACKEND_URL } from "../env";
export const LoginForm = () => {
const [username, setUsername] = useState('');
@ -28,7 +29,7 @@ export const LoginForm = () => {
formDetails.append('password', password);
try {
const response = await fetch('http://localhost:8000/token', {
const response = await fetch(`${BACKEND_URL}/token`, {
method: 'POST',
headers: {
'Content-Type': 'application/x-www-form-urlencoded',