mirror of
https://github.com/ItzCrazyKns/Perplexica.git
synced 2025-06-21 01:08:33 +00:00
Backend GKE Deploy, access key for backend
- Configs and automation for deploying backend to GKE - First steps to adding an optional token check for requests to backend - First steps frontend sending optional token to backend when configured
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
import { Dialog, Transition } from '@headlessui/react';
|
||||
import { CloudUpload, RefreshCcw, RefreshCw } from 'lucide-react';
|
||||
import React, { Fragment, useEffect, useState } from 'react';
|
||||
import { clientFetch } from '@/lib/utils';
|
||||
|
||||
interface SettingsType {
|
||||
chatModelProviders: {
|
||||
@ -42,7 +43,7 @@ const SettingsDialog = ({
|
||||
if (isOpen) {
|
||||
const fetchConfig = async () => {
|
||||
setIsLoading(true);
|
||||
const res = await fetch(`${process.env.NEXT_PUBLIC_API_URL}/config`, {
|
||||
const res = await clientFetch('/config', {
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
@ -102,7 +103,7 @@ const SettingsDialog = ({
|
||||
setIsUpdating(true);
|
||||
|
||||
try {
|
||||
await fetch(`${process.env.NEXT_PUBLIC_API_URL}/config`, {
|
||||
await clientFetch('/config', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
|
Reference in New Issue
Block a user