diff --git a/Client/src/Components/Host/index.jsx b/Client/src/Components/Host/index.jsx
deleted file mode 100644
index 370745f4d..000000000
--- a/Client/src/Components/Host/index.jsx
+++ /dev/null
@@ -1,18 +0,0 @@
-import React from "react";
-import OpenIt from "../../assets/Images/Icon-open-in-tab-gray.png";
-
-function Host(title, precentage, statusColor, link) {
- return (
-
-
-
-
-
{title}
-
- {precentage}%
-
-
- );
-}
-
-export default Host;
diff --git a/Client/src/Components/HostActions/index.jsx b/Client/src/Components/HostActions/index.jsx
deleted file mode 100644
index c974906e8..000000000
--- a/Client/src/Components/HostActions/index.jsx
+++ /dev/null
@@ -1,8 +0,0 @@
-import React from "react";
-import DashboardSettings from "../DashboardSettingsIcon";
-
-function HostActions() {
- return ;
-}
-
-export default HostActions;
diff --git a/Client/src/Components/HostStatus/index.jsx b/Client/src/Components/HostStatus/index.jsx
deleted file mode 100644
index 3b0660c33..000000000
--- a/Client/src/Components/HostStatus/index.jsx
+++ /dev/null
@@ -1,18 +0,0 @@
-import React from "react";
-
-function HostStatus(backgroundColor, status, dotColor) {
- return (
-
- );
-}
-
-export default HostStatus;
diff --git a/Client/src/Components/HostsTable/index.jsx b/Client/src/Components/HostsTable/index.jsx
deleted file mode 100644
index bc1dc1ff9..000000000
--- a/Client/src/Components/HostsTable/index.jsx
+++ /dev/null
@@ -1,80 +0,0 @@
-import PropTypes from "prop-types";
-import Host from "../Host/";
-import HostStatus from "../HostStatus";
-import ResponseTimeChart from "../Charts/ResponseTimeChart";
-/**
- * HostsTable displays the current status of monitor
- *
- * @component
- * @param {Array} monitors - An array of monitor objects to be displayed.
- */
-
-const getLastCheckStatus = (monitor) => {
- if (monitor.checks.length === 0) {
- // Default values for when there are no checks
- return {
- color: "var(--env-var-color-21)",
- statusText: "No Data",
- dotColor: "var(--env-var-color-19)",
- };
- }
-
- const lastCheck = monitor.checks[monitor.checks.length - 1];
- const isUp = lastCheck.status === true;
- return {
- color: isUp ? "var(--env-var-color-20)" : "var(--env-var-color-21)",
- statusText: isUp ? "Up" : "Down",
- dotColor: isUp ? "var(--env-var-color-17)" : "var(--env-var-color-19)",
- };
-};
-
-const HostsTable = ({ monitors }) => {
- return (
-
-
-
-
- | Host |
- Status |
- Response |
- Actions |
-
-
-
- {monitors.map((monitor) => {
- const host = Host(
- monitor.name,
- 100,
- "var(--env-var-color-17)",
- monitor.url
- );
-
- const { color, currentStatus, dotColor } =
- getLastCheckStatus(monitor);
-
- const status = HostStatus(color, currentStatus, dotColor);
-
- return (
-
- | {host} |
- {status} |
-
-
- |
-
- {monitor.actions}
- |
-
- );
- })}
-
-
-
- );
-};
-
-HostsTable.propTypes = {
- monitors: PropTypes.arrayOf(PropTypes.object).isRequired,
-};
-
-export default HostsTable;
diff --git a/Client/src/Pages/Details/index.jsx b/Client/src/Pages/Details/index.jsx
index 79ff56a63..7217ff671 100644
--- a/Client/src/Pages/Details/index.jsx
+++ b/Client/src/Pages/Details/index.jsx
@@ -1,5 +1,4 @@
import React, { useEffect, useState } from "react";
-import CustomizedTables from "../../Components/CustomizedTables";
import { Box, Typography, useTheme } from "@mui/material";
import { useSelector } from "react-redux";
import { useParams } from "react-router-dom";
diff --git a/Server/controllers/authController.js b/Server/controllers/authController.js
index 979a0b87e..51ee2dac1 100644
--- a/Server/controllers/authController.js
+++ b/Server/controllers/authController.js
@@ -309,11 +309,11 @@ const validateRecoveryTokenController = async (req, res, next) => {
const resetPasswordController = async (req, res, next) => {
try {
await newPasswordValidation.validateAsync(req.body);
- user = await req.db.resetPassword(req, res);
+ const response = await req.db.resetPassword(req, res);
res.status(200).json({
success: true,
msg: successMessages.AUTH_RESET_PASSWORD,
- data: user,
+ data: response,
});
} catch (error) {
error.service = SERVICE_NAME;
diff --git a/Server/db/MongoDB.js b/Server/db/MongoDB.js
index c0b0948a2..4b225b543 100644
--- a/Server/db/MongoDB.js
+++ b/Server/db/MongoDB.js
@@ -220,7 +220,8 @@ const resetPassword = async (req, res) => {
})
.select("-password")
.select("-profileImage");
- return userWithoutPassword;
+ const token = issueToken(userWithoutPassword);
+ return { user: userWithoutPassword, token: token };
} else {
throw new Error(errorMessages.DB_USER_NOT_FOUND);
}