url-shortener: vendor pico.css
diff --git a/apps/url-shortener/static/main.js b/apps/url-shortener/static/main.js
new file mode 100644
index 0000000..2c52bef
--- /dev/null
+++ b/apps/url-shortener/static/main.js
@@ -0,0 +1,21 @@
+function toggle(name, status) {
+ const data = {
+ name: name,
+ active: status,
+ };
+ fetch("/api/update/", {
+ method: "POST",
+ headers: {
+ "Content-Type": "application/json",
+ },
+ body: JSON.stringify(data),
+ })
+ .then((response) => {
+ if (response.ok) {
+ window.location.reload();
+ }
+ })
+ .catch((error) => {
+ console.error("Error:", error);
+ });
+}