Skip to content

Commit

Permalink
Merge pull request #67 from cylqqqcyl/cyl-dev
Browse files Browse the repository at this point in the history
Rolling back
  • Loading branch information
cylqqqcyl committed Nov 14, 2023
2 parents 36c04dd + ae6fded commit 396e4e7
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion app/frontend/.env.production
Original file line number Diff line number Diff line change
@@ -1 +1 @@
NEXT_PUBLIC_BACKEND_URL=
NEXT_PUBLIC_BACKEND_URL=http://localhost:5000
6 changes: 3 additions & 3 deletions app/frontend/src/contexts/auth-context.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ export const AuthProvider = (props) => {

const signIn = async (email, password) => {
try {
const response = await fetch(`${process.env.NEXT_PUBLIC_BACKEND_URL}/api/signin`, {
const response = await fetch(`${process.env.NEXT_PUBLIC_BACKEND_URL}/signin`, {
method: 'POST',
headers: {
'Content-Type': 'application/json'
Expand Down Expand Up @@ -159,7 +159,7 @@ export const AuthProvider = (props) => {

const signUp = async (email, name, password) => {
try {
const response = await fetch(`${process.env.NEXT_PUBLIC_BACKEND_URL}/api/signup`, {
const response = await fetch(`${process.env.NEXT_PUBLIC_BACKEND_URL}/signup`, {
method: 'POST',
headers: {
'Content-Type': 'application/json'
Expand Down Expand Up @@ -187,7 +187,7 @@ export const AuthProvider = (props) => {
const signOut = async () => {

try {
const response = await fetch(`${process.env.NEXT_PUBLIC_BACKEND_URL}/api/signout`, {
const response = await fetch(`${process.env.NEXT_PUBLIC_BACKEND_URL}/signout`, {
method: 'POST',
headers: {
'Content-Type': 'application/json'
Expand Down
2 changes: 1 addition & 1 deletion app/frontend/src/layouts/dashboard/top-nav.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import { useRouter } from 'next/router';
import { useState } from 'react';
import io from 'socket.io-client';

const socket = io(`${process.env.NEXT_PUBLIC_BACKEND_URL}/api`, {
const socket = io(`${process.env.NEXT_PUBLIC_BACKEND_URL}`, {
reconnection: true, // whether to automatically attempt to reconnect
reconnectionAttempts: 5, // number of reconnection attempts before giving up
reconnectionDelay: 1000, // how long to initially wait before attempting a new reconnection
Expand Down
2 changes: 1 addition & 1 deletion app/frontend/src/pages/chat.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const Page = () => {
]);
};
useEffect(() => {
const url = new URL(`${process.env.NEXT_PUBLIC_BACKEND_URL}/api/voices`);
const url = new URL(`${process.env.NEXT_PUBLIC_BACKEND_URL}/voices`);

fetch(url)
.then(response => response.json())
Expand Down
2 changes: 1 addition & 1 deletion app/frontend/src/pages/tts.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const Page = () => {
try {

const response = await fetch(
`${process.env.NEXT_PUBLIC_BACKEND_URL}/api/tts?speaker=${voiceCardSelected.name}&text=${textInput}&format=${formatValue}&length=${lengthValue}&noise=${noiseValue}&noisew=${noisewValue}&sdp=${sdpValue}`
`${process.env.NEXT_PUBLIC_BACKEND_URL}/tts?speaker=${voiceCardSelected.name}&text=${textInput}&format=${formatValue}&length=${lengthValue}&noise=${noiseValue}&noisew=${noisewValue}&sdp=${sdpValue}`
, {
method: 'GET'
});
Expand Down
2 changes: 1 addition & 1 deletion app/frontend/src/sections/voices/voices-card.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useState, useEffect } from 'react';
import React, {useState , useEffect} from 'react';
import { Card, Typography, Avatar, Box, IconButton } from '@mui/material';
import PlayIcon from '@mui/icons-material/PlayCircleOutline';
import PauseIcon from '@mui/icons-material/PauseCircleOutline';
Expand Down
2 changes: 1 addition & 1 deletion app/frontend/src/sections/voices/voices-select.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export const VoicesSelect = ({setVoiceCardSelected, searchText}) => {

useEffect(() => {
// Fetch voices data from server
const url = new URL(`${process.env.NEXT_PUBLIC_BACKEND_URL}/api/voices`);
const url = new URL(`${process.env.NEXT_PUBLIC_BACKEND_URL}/voices`);

if (searchText) {
url.searchParams.append('name', searchText); // Append searchText as a query parameter
Expand Down

0 comments on commit 396e4e7

Please sign in to comment.