Remove team and user id
This commit is contained in:
1 parent
c32cde6189
commit
5e23a2b79c
8 files changed
+11
-14
No files matched your search
@@ -414,10 +414,10 @@ const useDeleteAllMonitors = () => {
|
||||
const UseDeleteMonitorStats = () => {
|
||||
const { t } = useTranslation();
|
||||
const [isLoading, setIsLoading] = useState(false);
|
||||
const deleteMonitorStats = async ({ teamId }) => {
|
||||
const deleteMonitorStats = async () => {
|
||||
setIsLoading(true);
|
||||
try {
|
||||
const res = await networkService.deleteChecksByTeamId({ teamId });
|
||||
await networkService.deleteChecksByTeamId();
|
||||
createToast({ body: t("settingsStatsCleared") });
|
||||
} catch (error) {
|
||||
createToast({ body: t("settingsFailedToClearStats") });
|
||||
|
||||
@@ -186,8 +186,6 @@ const CreateInfrastructureMonitor = () => {
|
||||
...(isCreate ? {} : { _id: monitorId }),
|
||||
...rest,
|
||||
description: form.name,
|
||||
teamId: user.teamId,
|
||||
userId: user._id,
|
||||
type: "hardware",
|
||||
notifications: infrastructureMonitor.notifications,
|
||||
thresholds,
|
||||
|
||||
@@ -48,8 +48,6 @@ const CreateNotifications = () => {
|
||||
|
||||
// local state
|
||||
const [notification, setNotification] = useState({
|
||||
userId: user._id,
|
||||
teamId: user.teamId,
|
||||
notificationName: "",
|
||||
address: "",
|
||||
type: NOTIFICATION_TYPES[0]._id,
|
||||
|
||||
@@ -86,8 +86,6 @@ const CreatePageSpeed = () => {
|
||||
form = {
|
||||
...form,
|
||||
description: form.name,
|
||||
teamId: user.teamId,
|
||||
userId: user._id,
|
||||
notifications: monitor.notifications,
|
||||
};
|
||||
|
||||
|
||||
@@ -96,7 +96,7 @@ const Settings = () => {
|
||||
}
|
||||
|
||||
if (name === "deleteStats") {
|
||||
await deleteMonitorStats({ teamId: user.teamId });
|
||||
await deleteMonitorStats();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -142,8 +142,6 @@ const CreateMonitor = () => {
|
||||
form = {
|
||||
...form,
|
||||
description: monitor.name || monitor.url,
|
||||
teamId: user.teamId,
|
||||
userId: user._id,
|
||||
notifications: monitor.notifications,
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user