Attempt trigger process call server side
This commit is contained in:
parent
73bf7f3d79
commit
a62e39a776
8 changed files with 21 additions and 16 deletions
|
@ -8,7 +8,7 @@ import React, {
|
|||
type SelectHTMLAttributes,
|
||||
} from 'react';
|
||||
import ThemeSwitcher from './theme/Switcher';
|
||||
import process from 'process';
|
||||
import { getServerEnv } from '@/lib/serverEnvironment';
|
||||
|
||||
interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {}
|
||||
|
||||
|
@ -89,7 +89,7 @@ const SettingsDialog = ({
|
|||
if (isOpen) {
|
||||
const fetchConfig = async () => {
|
||||
setIsLoading(true);
|
||||
const res = await fetch(`${process.env.BACKEND_API_URL}/config`, {
|
||||
const res = await fetch(`${getServerEnv("BACKEND_API_URL")}/config`, {
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
|
@ -149,7 +149,7 @@ const SettingsDialog = ({
|
|||
setIsUpdating(true);
|
||||
|
||||
try {
|
||||
await fetch(`${process.env.BACKEND_API_URL}/config`, {
|
||||
await fetch(`${getServerEnv("BACKEND_API_URL")}/config`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue