remove network servcie

This commit is contained in:
Alex Holliday committed 2026-02-09 23:37:07 +00:00
1 parent b817a16459
commit 34762ef475
7 files changed
+19 -1276

No files matched your search

+2 -2
View File
@@ -2,7 +2,7 @@ import React, { useState } from "react";
import { Box, Typography, Button, Stack } from "@mui/material";
import { useTheme } from "@emotion/react";
import { useNavigate } from "react-router-dom";
import { networkService } from "@/Utils/NetworkService.js";
import { get } from "@/Utils/ApiClient";
import Alert from "@/Components/v1/Alert/index.jsx";
import { createToast } from "@/Utils/toastUtils.jsx";
import { useTranslation } from "react-i18next";
@@ -24,7 +24,7 @@ const ServerUnreachable = () => {
try {
// Try to connect to the backend with a simple API call
// We'll use any lightweight endpoint that doesn't require authentication
await networkService.axiosInstance.get("/health", { timeout: 5000 });
await get("/health", { timeout: 5000 });
// If successful, show toast and navigate to login page
createToast({
+16 -3
View File
@@ -12,7 +12,8 @@ import { PropTypes } from "prop-types";
import { useState } from "react";
import { useTranslation } from "react-i18next";
import { PasswordEndAdornment } from "@/Components/v1/Inputs/TextInput/Adornments/index.jsx";
import { useSendTestEmail } from "@/Hooks/useSendTestEmail.js";
import { usePost } from "@/Hooks/UseApi";
import { useSelector } from "react-redux";
import { createToast } from "@/Utils/toastUtils.jsx";
const SettingsEmail = ({
@@ -48,7 +49,8 @@ const SettingsEmail = ({
const [password, setPassword] = useState("");
// Network
const [isSending, , sendTestEmail] = useSendTestEmail(); // Using empty placeholder for unused error variable
const { post: sendTestEmailFn, loading: isSending } = usePost();
const user = useSelector((state) => state.auth.user);
// Handlers
const handlePasswordChange = (e) => {
@@ -94,7 +96,10 @@ const SettingsEmail = ({
}
// Send test email with current form values
sendTestEmail(emailConfig);
sendTestEmailFn("/settings/test-email", {
to: user.email,
...emailConfig,
});
};
if (!isAdmin) {
@@ -297,6 +302,14 @@ const SettingsEmail = ({
</Box>
</Box>
<pre>
{JSON.stringify({
systemEmailHost,
systemEmailAddress,
systemEmailPassword,
})}
</pre>
<Box>
{systemEmailHost &&
systemEmailPort &&