From 0427827858a70f6a994501c470d13f8113d05479 Mon Sep 17 00:00:00 2001 From: Emily Date: Tue, 4 Jun 2024 15:36:51 +0200 Subject: [PATCH] stripe --- dashboard/pages/admin/index.vue | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/dashboard/pages/admin/index.vue b/dashboard/pages/admin/index.vue index 057e860..11529f4 100644 --- a/dashboard/pages/admin/index.vue +++ b/dashboard/pages/admin/index.vue @@ -73,13 +73,25 @@ function onHideClicked() { isAdminHidden.value = true; } +const activeProject = useActiveProject(); + +async function payment() { + const res = await $fetch(`/api/pay/${activeProject.value?._id.toString()}/create`, { + ...signHeaders({ 'content-type': 'application/json' }), + method: 'POST', + body: JSON.stringify({ planId: 1 }) + }) + console.log(res); +} +