From 6fdd8bed900128a5fc64b1886b0a0fdf476b40aa Mon Sep 17 00:00:00 2001 From: Joschua Becker Date: Wed, 6 Nov 2024 07:31:09 +0100 Subject: [PATCH 1/3] chore: updated ci to use wrangler --- .github/workflows/build.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3d996f5..73f06a0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -72,10 +72,8 @@ jobs: \"https://scolasti.co/go/privacy\"}" > client/config.json - name: Upload client bundle to cloudflare - uses: cloudflare/pages-action@v1 + uses: cloudflare/wrangler-action@v3 with: apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} - projectName: not-three - directory: client - wranglerVersion: '3' + command: pages deploy client/ --project-name=not-three From a2b15e2096a46e6483ea231b64ce884cab72fe6b Mon Sep 17 00:00:00 2001 From: Joschua Becker Date: Wed, 6 Nov 2024 07:31:57 +0100 Subject: [PATCH 2/3] fix: updated gh issue url to redirect to all issues, instead of new --- components/nav-bar.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/nav-bar.vue b/components/nav-bar.vue index 8d09a14..2ffb50a 100644 --- a/components/nav-bar.vue +++ b/components/nav-bar.vue @@ -185,7 +185,7 @@ function handle(entry: string) { window.open('https://github.com/not-three/main', '_blank') break case 'help': - window.open('https://github.com/not-three/main/issues/new', '_blank') + window.open('https://github.com/not-three/main/issues', '_blank') break case 'terms': console.log(JSON.stringify(props.config)) From 67f550ed2b8a05bbf7949784e88fe1b099c410a3 Mon Sep 17 00:00:00 2001 From: Joschua Becker Date: Wed, 6 Nov 2024 07:32:45 +0100 Subject: [PATCH 3/3] fix: burn notes api response missing --- server/api/json/[id]/[key].get.ts | 4 ++-- server/api/json/[id]/index.get.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/server/api/json/[id]/[key].get.ts b/server/api/json/[id]/[key].get.ts index 2d91ab1..ebf754b 100644 --- a/server/api/json/[id]/[key].get.ts +++ b/server/api/json/[id]/[key].get.ts @@ -19,11 +19,11 @@ export default defineEventHandler(async (event) => { return { success: true, content: CryptoJS.AES.decrypt(note.content, key).toString(CryptoJS.enc.Utf8), - expires: note.burn_after_reading ? Math.floor(new Date() / 1000) : note.expires_at, + expires: note.burn_after_reading ? Math.floor(+new Date() / 1000) : note.expires_at, burnt: note.burn_after_reading, } } catch (e) { setResponseStatus(event, 400); - return {success: false, error: 'Invalid key', burn: note.burnAfterReading}; + return {success: false, error: 'Invalid key', burnt: note.burn_after_reading}; } }) diff --git a/server/api/json/[id]/index.get.ts b/server/api/json/[id]/index.get.ts index c9686f9..6490244 100644 --- a/server/api/json/[id]/index.get.ts +++ b/server/api/json/[id]/index.get.ts @@ -12,7 +12,7 @@ export default defineEventHandler(async (event) => { return { success: true, content: note.content, - expires: note.burn_after_reading ? Math.floor(new Date() / 1000) : note.expires_at, + expires: note.burn_after_reading ? Math.floor(+new Date() / 1000) : note.expires_at, burnt: note.burn_after_reading, } })