rn its all in nextjs
My suggestion is using functions. They're really easy to start with and basically you can trigger/call them from your app, so you could achieve what you're trying really easily, and even send an email or notification through it, if needed.
I don't have experience with JWT, so I can't give you too much guidance on that. Sorry for not being able to solve your main issue π
With functions you can easily get the user?
and it can be called by a user
Yeah
hmm
Yes, too
That sounds pretty nice π
Cant find how to run them from the client in the docs
copilot came up with this
but I dont think it works
It's
const promise = functions.createExecution('[FUNCTION_ID]');
Not function name
Thanks
If you want to send it payload (for example, in a form, the fields) that's how it should be: It's
const promise = functions.createExecution('[FUNCTION_ID], [YOUR_PAYLOAD_HERE]');
By default, the server gets the current user who is executing the function, so you don't need to send anything related in the payload
To get the user who triggered the user, you can get it this way:
const userID = req.variables.APPWRITE_FUNCTION_USER_ID;
<a:happi:1107928866477064202>
Congrats on deploying and triggering your first function <:appwriterocket:823996226894692403>
Congrats!!
the best feeling tbh.
Yeah, I got several errors first time I tried π
+1
Gonna close this thread for now, if you have more questions, feel free to open a new post and find us in #πβsupport β€οΈ thanks @D5
[SOLVED] Get session jwt token
Recommended threads
- CORS errors in Obsidian custom plugin
Hi, anyone here familiar with obsidian community plugins? In short: it's a local first note app which supports writing your own add-ons / plugin But I keep get...
- > AppwriteException: The requested servi...
When trying to read or write from my database I get the following error: > AppwriteException: The requested service is disabled. You can enable the service from...
- Courtesy limit reset for non-profit migr...
Hi Team! I'm the architect for a 501(c)(3) non-profit project (Aaria's Blue Elephant) and we just hit our Free plan Database Read limit (currently at 164%). Th...