Compare commits

...

3 Commits

Author SHA1 Message Date
18ead8b027 force Manage Subscription button 2024-04-02 15:24:26 -04:00
5822ced6af revert previous commit 2024-04-02 15:12:16 -04:00
d8396abd36 refactor get user id from thing 2024-04-02 14:27:59 -04:00
2 changed files with 3 additions and 3 deletions

View File

@ -69,7 +69,7 @@ async function showPage({ rootEl, peertubeHelpers }) {
<h4><i>NCTV also offers cryptocurrency subscriptions for media storage. Contact Matty on <a href="https://nicecrew.digital/@matty" target="_blank">NCD</a>, <a href="https://matrix.to/#/@matty:chat.nicecrew.digital" target="_blank">Matrix</a>, or via <a href="mailto:matty@nicecrew.digital">email</a>.</i></h4> <h4><i>NCTV also offers cryptocurrency subscriptions for media storage. Contact Matty on <a href="https://nicecrew.digital/@matty" target="_blank">NCD</a>, <a href="https://matrix.to/#/@matty:chat.nicecrew.digital" target="_blank">Matrix</a>, or via <a href="mailto:matty@nicecrew.digital">email</a>.</i></h4>
</div> </div>
${session_id ? `
<div class="mt-5"> <div class="mt-5">
<form method="POST" action="#" id="formManageSub"> <form method="POST" action="#" id="formManageSub">
<input type="hidden" id="session-id" name="session_id" value="${session_id}" /> <input type="hidden" id="session-id" name="session_id" value="${session_id}" />
@ -77,7 +77,7 @@ async function showPage({ rootEl, peertubeHelpers }) {
</form> </form>
</div> </div>
` : ""}
${sub_plan ? ` ${sub_plan ? `
<p><i><b>${await translate("Your current plan")}</b>: ${sub_plan.name}, ${currency}${sub_plan.price} /${await peertubeHelpers.translate("month")}, ${sub_plan.storage} ${await peertubeHelpers.translate("GB Storage")}</i></p> <p><i><b>${await translate("Your current plan")}</b>: ${sub_plan.name}, ${currency}${sub_plan.price} /${await peertubeHelpers.translate("month")}, ${sub_plan.storage} ${await peertubeHelpers.translate("GB Storage")}</i></p>

View File

@ -151,7 +151,7 @@ async function register({
const INSTANCE_URL = "https://" + req.get('host'); const INSTANCE_URL = "https://" + req.get('host');
// For demonstration purposes, we're using the Checkout session to retrieve the customer ID. // For demonstration purposes, we're using the Checkout session to retrieve the customer ID.
// Typically this is stored alongside the authenticated user in your database. // Typically this is stored alongside the authenticated user in your database. (psql) users -> userID ->
const { session_id } = req.body; const { session_id } = req.body;
const checkoutSession = await stripe.checkout.sessions.retrieve(session_id); const checkoutSession = await stripe.checkout.sessions.retrieve(session_id);