diff --git a/src/components/services/widget/button.jsx b/src/components/services/widget/button.jsx
index 5aa0c20ee..f74aea2e1 100644
--- a/src/components/services/widget/button.jsx
+++ b/src/components/services/widget/button.jsx
@@ -2,7 +2,8 @@ import classNames from "classnames";
export default function Button({ click, label, className = "font-thin text-sm" }) {
return (
-
+
);
}
diff --git a/src/widgets/olivetin/component.jsx b/src/widgets/olivetin/component.jsx
index 3e499dc27..bb2372799 100644
--- a/src/widgets/olivetin/component.jsx
+++ b/src/widgets/olivetin/component.jsx
@@ -4,15 +4,15 @@ import Button from "components/services/widget/button";
export default function Component({ service }) {
const { widget } = service;
const { url, actions = [] } = widget;
+ const urlTrailess = url.replace(/\/$/, "");
function startAction(actionId) {
if (actionId) {
- fetch(url.replace(/\/$/, "") + "/api/StartActionByGet/" + actionId).then((res) => {
+ fetch(`${urlTrailess}/api/StartActionByGet/${actionId}`).then((res) => {
if (res.ok) {
return res.json();
- } else {
- throw new Error(res.statusText);
}
+ return res.statusText;
});
}
}
diff --git a/src/widgets/olivetin/widget.js b/src/widgets/olivetin/widget.js
deleted file mode 100644
index 2697dfb13..000000000
--- a/src/widgets/olivetin/widget.js
+++ /dev/null
@@ -1,14 +0,0 @@
-import genericProxyHandler from "utils/proxy/handlers/generic";
-
-const widget = {
- api: "{url}/api/v1/{endpoint}/{key}",
- proxyHandler: genericProxyHandler,
-
- mappings: {
- devices: {
- endpoint: "devices",
- },
- },
-};
-
-export default widget;
diff --git a/src/widgets/widgets.js b/src/widgets/widgets.js
index e2df4787d..a9cae230f 100644
--- a/src/widgets/widgets.js
+++ b/src/widgets/widgets.js
@@ -60,7 +60,6 @@ import nextdns from "./nextdns/widget";
import npm from "./npm/widget";
import nzbget from "./nzbget/widget";
import octoprint from "./octoprint/widget";
-import olivetin from "./olivetin/widget";
import omada from "./omada/widget";
import ombi from "./ombi/widget";
import opendtu from "./opendtu/widget";
@@ -176,7 +175,6 @@ const widgets = {
npm,
nzbget,
octoprint,
- olivetin,
omada,
ombi,
opendtu,