-
Notifications
You must be signed in to change notification settings - Fork 296
Closed
Labels
documentationImprovements or additions to documentationImprovements or additions to documentation
Description
💭 Description
Description:
In the SvelteKit tutorial under step 3, there is a mistake in the code snippet provided. Specifically, the import statement for the Database and Account object is missing, and the appwrite module exports Databases instead of Database.
Current code:
import { Client } from "appwrite";
const client = new Client();
client
.setEndpoint("https://cloud.appwrite.io/v1")
.setProject("<YOUR_PROJECT_ID>"); // Replace with your project ID
export const account = new Account(client);
export const database = new Database(client);
Suggested correction:
import { Client, Databases, Account } from "appwrite"; // Added Databases & Account import
const client = new Client();
client
.setEndpoint("https://cloud.appwrite.io/v1")
.setProject("<YOUR_PROJECT_ID>");
export const account = new Account(client);
export const database = new Databases(client); // Changed to Databases
This adjustment ensures that the code functions as expected.
Steps to Reproduce:
- Go to the SvelteKit tutorial step 3.
- Follow the provided code snippet.
Expected Behavior:
The code provided should be accurate and functional.
Additional Information:
Documentation URL: https://appwrite.io/docs/tutorials/sveltekit/step-3
👀 Have you spent some time to check if this issue has been raised before?
- I checked and didn't find similar issue
🏢 Have you read the Code of Conduct?
- I have read the Code of Conduct
Metadata
Metadata
Assignees
Labels
documentationImprovements or additions to documentationImprovements or additions to documentation