In the Server-Side Rendering Astro template, I'm currently trying to get it to work where the user can update their account.
I've added an input field where they can update their name, but when submitting it, I get the following error:
02:53:01 [watch] src/pages/account.astro
02:53:03 [ERROR] app.67de538f000787f352da@service.localhost (role: applications) missing scope (account)
Stack trace:
at Client.call (/home/korbs/demos-for-astro/server-side-rendering/node_modules/node-appwrite/lib/client.js:206:15)
[...] See full stack trace in the browser, or rerun with --verbose.
The following code was added to `src/pages/account.astro`: ```jsx
... if (Astro.request.method === "POST") { const data = await Astro.request.formData(); const name = data.get("name") as string; const { account } = createAdminClient(); await account.updateName(name); return Astro.redirect("/account?=username_updated"); } ...
...
<section> <p>Change name:</p> <form method="POST"> <input style="background: #1c1c21;border: 1px #2c2c30 solid;padding: 6px 12px;border-radius: 6px;" id="name" name="name"/> <button class="button is-secondary is-full-width" type="submit">Update Username</button> </form> </section> ... ```The API key I used as access to all scopes.
Recommended threads
- Migration from Self-Hosted to Cloud seem...
Hello, I'm trying to migrate from my Self-Hosted Appwrite instance to Cloud, and can't figure out what's going wrong. - If I initiate the migration from Cloud...
- custom domain on self host Appwrite
I am having a issue, i am using self host version of appwrite at my custom domain (appwrite.example.com), but when i tried adding a custom domain (project1.exam...
- 1.9 Upgrade Issues (Creating Logs Table)
The upgrade seemingly completed without a hitch, I almost gave the credit on how seamless it was, until appwrite refused to come back up and is now completely b...