updated certs endpoint and delete certs/reate certs/delete endpoints

This commit is contained in:
wt committed 2025-07-25 18:48:12 +07:00
1 parent b42e9ac7da
commit f05ebf2ae7
7 files changed
+71 -64

No files matched your search

+2 -2
View File
@@ -103,8 +103,8 @@ if (preview) {
cards.addEventListener("click", (e) => {
if (e.target.classList.contains("delcert")) {
if (confirm("Are you sure you want to delete this certificate?")) {
fetch(window.location.origin + `/api/certs/delete`, {
method: "POST",
fetch(window.location.origin + `/api/certs`, {
method: "DELETE",
headers: {
"Content-Type": "application/json",
},
+1 -1
View File
@@ -15,7 +15,7 @@ create_certificate_form.addEventListener("submit", (event) => {
const passwordValue = password.value;
const organizationunitValue = organizationunit.value;
fetch(window.location.origin + "/api/certs/create", {
fetch(window.location.origin + "/api/certs", {
method: "POST",
headers: {
"Content-Type": "application/json",