diff --git a/docs/60-schema-validation/2-validate-users.mdx b/docs/60-schema-validation/2-validate-users.mdx index 6d80a29..cb74a53 100644 --- a/docs/60-schema-validation/2-validate-users.mdx +++ b/docs/60-schema-validation/2-validate-users.mdx @@ -83,7 +83,7 @@ You need to run the script to apply the schema to the `users` collection. ```sh cd server - node dist/schema-validation/apply-schema.js + npx tsx src/schema-validation/apply-schema.ts ``` @@ -112,7 +112,7 @@ Now that the schema validation is enabled for the `users` collection, you can te 3. Execute the script by running the following command. ```node - node dist/schema-validation/test-validation.js + npx tsx src/schema-validation/test-validation.ts ``` The error describes that the `name` and `isAdmin` fields are required but missing in the document you tried to insert. diff --git a/docs/60-schema-validation/3-validate-authors.mdx b/docs/60-schema-validation/3-validate-authors.mdx index 6bfba3d..b9a071f 100644 --- a/docs/60-schema-validation/3-validate-authors.mdx +++ b/docs/60-schema-validation/3-validate-authors.mdx @@ -9,7 +9,7 @@ This is an advanced exercises that requires you to write code. If you get stuck 1. Execute the script again to apply the schema to the `authors` collection. ```bash cd server - node dist/schema-validation/apply-schema.js + npx tsx src/schema-validation/apply-schema.ts ``` 1. Finally, test the schema validation by modifying the `server/src/schema-validation/test-validation.ts` script. Inserting a document in the `authors` collection.