Compare commits

..

No commits in common. "b922df3766ba7cf770b7bf92b88ffe1640f20d88" and "b5fb75e82d850544a574b243300b5cf49e3b185e" have entirely different histories.

6 changed files with 8 additions and 13 deletions

View file

@ -2,7 +2,4 @@
VITE_CLIENT_ID=
# OpenRouteService API key. Create one at OpenRouteService dev dashboard > Tokens
VITE_OPENROUTESERVICE_API_KEY=
# Specify backend URL here
VITE_BACKEND_URL=
VITE_OPENROUTESERVICE_API_KEY=

View file

@ -368,9 +368,7 @@ export default {
if (currentUser) {
console.log('Logged in. Proceed to add to favorites.');
fetch(`${import.meta.env.VITE_BACKEND_URL}/api/favorites/create`, {
// fetch("https://little-lines-backend.techtransthai.org/api/favorites/create", {
fetch("https://little-lines-backend.techtransthai.org/api/favorites/create", {
method: "POST",
headers: {
'Content-Type': 'application/json',

View file

@ -42,7 +42,7 @@ export default {
const currentUser = JSON.parse(sessionStorage.getItem('current_user'));
if (currentUser && currentUser.id) {
const response = await fetch(`${import.meta.env.VITE_BACKEND_URL}/api/favorites/${currentUser.id}`);
const response = await fetch(`https://little-lines-backend.techtransthai.org/api/favorites/${currentUser.id}`);
if (!response.ok) {
throw new Error('Failed to fetch favorites');

View file

@ -98,7 +98,7 @@ export default {
login() {
if (this.input.email !== '' && this.input.password !== '') {
console.log('Authenticated: Checking with Backend');
fetch(`${import.meta.env.VITE_BACKEND_URL}/api/users/login`, {
fetch(`https://little-lines-backend.techtransthai.org/api/users/login`, {
method: "POST",
headers: {
"Content-Type": "application/json",
@ -138,7 +138,7 @@ export default {
client_id:
import.meta.env.VITE_CLIENT_ID,
scope: "email profile openid",
redirect_uri: `${import.meta.env.VITE_BACKEND_URL}/api/users/googleAuth/callback`,
redirect_uri: "https://little-lines-backend.techtransthai.org/api/users/googleAuth/callback",
callback: response => {
if (response.code) {
this.sendCodeToBackend(response.code);
@ -153,7 +153,7 @@ export default {
const headers = {
Authorization: code
};
const response = await axios.post(`${import.meta.env.VITE_BACKEND_URL}/api/users/googleAuth`, null, { headers });
const response = await axios.post("https://little-lines-backend.techtransthai.org/api/users/googleAuth", null, { headers });
const userDetails = response.data;
console.log("User Details:", userDetails);
this.userDetails = userDetails;

View file

@ -108,7 +108,7 @@ import eyeNotLooking from '../../icons/Material/eye-not-looking.svg';
register() {
if (this.input.username !== '' && ((this.input.password !='') && (this.input.password == this.input.passwordConfirm))) {
console.log('Authenticated: Checking with Backend');
fetch(`${import.meta.env.VITE_BACKEND_URL}/api/users/create`, {
fetch("https://little-lines-backend.techtransthai.org/api/users/create", {
method: "POST",
headers: {
'Content-Type': 'application/json',

View file

@ -97,7 +97,7 @@ const display_items = [
function logout() {
if (sessionStorage.getItem('current_user')){
console.log('loging out...');
fetch(`${import.meta.env.VITE_BACKEND_URL}/api/users/logout`, {
fetch(`https://little-lines-backend.techtransthai.org/api/users/logout`, {
method: "GET"
}).then(()=>{
console.log('loged out');