From a577ab32f155ec410220d3edc28d3cd5d18f7106 Mon Sep 17 00:00:00 2001 From: ElementalAlchemist Date: Wed, 6 Nov 2024 08:40:09 -0600 Subject: [PATCH] Pass the auth token when submitting thumbnails --- thrimbletrimmer/scripts/thumbnails.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/thrimbletrimmer/scripts/thumbnails.js b/thrimbletrimmer/scripts/thumbnails.js index 1c661d2..99ff05b 100644 --- a/thrimbletrimmer/scripts/thumbnails.js +++ b/thrimbletrimmer/scripts/thumbnails.js @@ -87,6 +87,9 @@ window.addEventListener("DOMContentLoaded", async (event) => { crop: [cropXStart, cropYStart, cropXEnd, cropYEnd], location: [locXStart, locYStart, locXEnd, locYEnd], }; + if (googleUser) { + submitData.token = googleUser.getAuthResponse().id_token; + } if (!errorListContainer.hasChildNodes()) { const submitResponse = await fetch("/thrimshim/add-template", {