-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: QR Generation & Storage: Supabase Edge Function #10
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…cf-18-qr-gen-edge
christophertorres1
changed the title
QR Generation & Storage: Supabase Edge Function [OCF-18]
feat: QR Generation & Storage: Supabase Edge Function
Dec 11, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What's new in this PR
Description
Implement a Supabase Edge Function using Deno that generates a QR code image based on a
tree_id
input, and stores the image in our Supabase storage bucket.How to review
For more context, read the documentation at
src/supabase/functions/README.md
. Then, reviewindex.ts
.Testing details are found in the README, but local testing generally involves more setup (Docker desktop, Supabase CLI). If you are looking to test, I'd recommend testing the deployed Edge function:
The deployed Edge Function should be visible via the Supabase console. You can test the deployed function with the following curl command. Be sure to replace
ANON_KEY
with the actual key, and thetree_id
with a ID that doesn't already have an image created in the Supabase bucket. After the request, you can verify that the QR image is added to our Supabase Storage bucket, and that it contains the correcttree_id
.Next steps
Consider client-side usage, and design a way to handle errors (multiple requests for the same id, etc), which involves finding where this Edge function is to be called, and other implementation details.
Relevant links
Online sources
Developing Edge Functions Locally
Deploy to Production
ocf-18
CC: @christophertorres1