Skip to content
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

📚 Documentation: Error in SvelteKit Tutorial Step 3 #136

Closed
2 tasks done
Mazahir26 opened this issue Sep 30, 2023 · 4 comments
Closed
2 tasks done

📚 Documentation: Error in SvelteKit Tutorial Step 3 #136

Mazahir26 opened this issue Sep 30, 2023 · 4 comments
Assignees
Labels
documentation Improvements or additions to documentation

Comments

@Mazahir26
Copy link

💭 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:

  1. Go to the SvelteKit tutorial step 3.
  2. 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?

@Mazahir26 Mazahir26 added the documentation Improvements or additions to documentation label Sep 30, 2023
@saiharsha-22
Copy link

saiharsha-22 commented Oct 1, 2023

Hello @Haimantika and @gewenyu99 Can i get this issue assigned to me ? I can work on this.

@Haimantika
Copy link
Contributor

Haimantika commented Oct 1, 2023

Hello @Haimantika and @gewenyu99 Can i get this issue assigned to me ? I can work on this.

Hi @saiharsha-22 have assigned the issue to you! Thank you for showing interest in contributing to Appwrite!

saiharsha-22 pushed a commit to saiharsha-22/website that referenced this issue Oct 1, 2023
@saiharsha-22
Copy link

saiharsha-22 commented Oct 1, 2023

Hello @Haimantika and @gewenyu99 I have raised the pull-request for the following issue :- #142 can you pls check it once. Can you add hacktoberfest label as i am participant of it. Thank you.

TorstenDittmann added a commit that referenced this issue Oct 1, 2023
@gewenyu99
Copy link
Contributor

Hello @Haimantika and @gewenyu99 I have raised the pull-request for the following issue :- #142 can you pls check it once. Can you add hacktoberfest label as i am participant of it. Thank you.

This will not be part of Hacktoberfest. But we're more than happy to receive your help ❤️

This year, only tasks marked as Hacktoberfest and opened by maintainers will be accepted as Hacktoberfest contributions. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

4 participants