diff --git a/cdn/cdn/js/favorites.js_back b/cdn/cdn/js/favorites.js_back deleted file mode 100644 index 1fff851..0000000 --- a/cdn/cdn/js/favorites.js_back +++ /dev/null @@ -1,40 +0,0 @@ -document.addEventListener('DOMContentLoaded', () => { - console.log("favorites.js ejecutado correctamente"); - - const favoriteButton = document.getElementById('favorite-button'); - if (!favoriteButton) { - console.warn("Botón de favoritos no encontrado. ¿El usuario está autenticado?"); - return; - } - - // Obtener el pasteId desde el atributo del - const pasteId = document.body.dataset.pasteId; - if (!pasteId) { - console.error("Error: pasteId no está definido en el ."); - return; - } - - favoriteButton.addEventListener('click', function () { - fetch(`/paste/${pasteId}/favorite`, { - method: 'POST', - headers: { - 'Authorization': 'Bearer ' + (document.body.dataset.authToken || '') - } - }) - .then(response => { - if (!response.ok) { - throw new Error('Failed to toggle favorite'); - } - return response.json(); - }) - .then(data => { - const message = data.message || 'Action completed!'; - showToast(message, 'bg-success'); - }) - .catch(error => { - console.error('Error:', error); - showToast('Error adding to favorites.', 'bg-danger'); - }); - }); -}); - diff --git a/k8s/sqlite/pastebin-deployment.yaml_backup b/k8s/sqlite/pastebin-deployment.yaml_backup deleted file mode 100644 index 3dc233b..0000000 --- a/k8s/sqlite/pastebin-deployment.yaml_backup +++ /dev/null @@ -1,88 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: pastebin-app -spec: - replicas: 1 - selector: - matchLabels: - app: pastebin - template: - metadata: - labels: - app: pastebin - spec: - # InitContainers para ajustar permisos de ambos volúmenes - initContainers: - - name: fix-permissions-database - image: busybox - command: ["sh", "-c", "chown -R 1000:1000 /app/database"] - volumeMounts: - - name: database - mountPath: /app/database - - name: fix-permissions-uploads - image: busybox - command: ["sh", "-c", "chown -R 1000:1000 /app/uploads"] - volumeMounts: - - name: uploads - mountPath: /app/uploads - # Contenedor principal - containers: - - name: pastebin-container - image: prietus/pastebin-app:1.4 - ports: - - containerPort: 5000 - securityContext: - runAsUser: 1000 - runAsGroup: 1000 - env: - # Variables de entorno para configuración SMTP - - name: SMTP_SERVER - valueFrom: - configMapKeyRef: - name: pastebin-config - key: SMTP_SERVER - - name: SMTP_PORT - valueFrom: - configMapKeyRef: - name: pastebin-config - key: SMTP_PORT - - name: SMTP_USERNAME - valueFrom: - secretKeyRef: - name: pastebin-secret - key: SMTP_USERNAME - - name: SMTP_PASSWORD - valueFrom: - secretKeyRef: - name: pastebin-secret - key: SMTP_PASSWORD - # Variables adicionales - - name: VALID_USER - value: "admin" - - name: VALID_PASS - value: "wasamasa123" - - name: SECRET_KEY - valueFrom: - secretKeyRef: - name: pastebin-secret - key: SECRET_KEY - - name: JWT_EXP_DELTA_SECONDS - valueFrom: - configMapKeyRef: - name: pastebin-config - key: JWT_EXP_DELTA_SECONDS - volumeMounts: - - name: database - mountPath: /app/database - - name: uploads - mountPath: /app/uploads - # Declaración de volúmenes - volumes: - - name: database - persistentVolumeClaim: - claimName: database-pvc - - name: uploads - persistentVolumeClaim: - claimName: uploads-pvc - diff --git a/static/js/favorites.js_back b/static/js/favorites.js_back deleted file mode 100644 index 1fff851..0000000 --- a/static/js/favorites.js_back +++ /dev/null @@ -1,40 +0,0 @@ -document.addEventListener('DOMContentLoaded', () => { - console.log("favorites.js ejecutado correctamente"); - - const favoriteButton = document.getElementById('favorite-button'); - if (!favoriteButton) { - console.warn("Botón de favoritos no encontrado. ¿El usuario está autenticado?"); - return; - } - - // Obtener el pasteId desde el atributo del - const pasteId = document.body.dataset.pasteId; - if (!pasteId) { - console.error("Error: pasteId no está definido en el ."); - return; - } - - favoriteButton.addEventListener('click', function () { - fetch(`/paste/${pasteId}/favorite`, { - method: 'POST', - headers: { - 'Authorization': 'Bearer ' + (document.body.dataset.authToken || '') - } - }) - .then(response => { - if (!response.ok) { - throw new Error('Failed to toggle favorite'); - } - return response.json(); - }) - .then(data => { - const message = data.message || 'Action completed!'; - showToast(message, 'bg-success'); - }) - .catch(error => { - console.error('Error:', error); - showToast('Error adding to favorites.', 'bg-danger'); - }); - }); -}); -