Skip to content

Commit 1129088

Browse files
committed
doc: fix user creation examples
1 parent d37bd6f commit 1129088

File tree

6 files changed

+13
-13
lines changed

6 files changed

+13
-13
lines changed

docs/examples/basic-setup.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ npm install db0 better-sqlite3 bcrypt nodemailer
1717
npx nuxt-users migrate
1818

1919
# Create your first user
20-
npx nuxt-users create-user admin@example.com "Admin User" password123
20+
npx nuxt-users create-user -e admin@example.com -n "Admin User" -p password123 -r admin
2121
```
2222

2323
```ts
@@ -408,7 +408,7 @@ ls -la ./database/users.db
408408

409409
```bash
410410
# Create a test user
411-
npx nuxt-users create-user test@example.com "Test User" password123
411+
npx nuxt-users create-user -e test@example.com -n "Test User" -p password123
412412

413413
# Verify user was created (optional)
414414
sqlite3 ./data/users.sqlite3 "SELECT * FROM users;"
@@ -460,7 +460,7 @@ npm install nuxt-users
460460
npx nuxt-users migrate
461461

462462
# Create user
463-
npx nuxt-users create-user email@example.com "Name" password
463+
npx nuxt-users create-user -e email@example.com -n "Name" -p password
464464

465465
# Start development
466466
npm run dev

docs/user-guide/authorization.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -189,16 +189,16 @@ You can create users with specific roles using the CLI:
189189

190190
```bash
191191
# Create a standard user
192-
npx nuxt-users create-user user@example.com "John Doe" password123 user
192+
npx nuxt-users create-user -e user@example.com -n "John Doe" -p password123 -r user
193193

194194
# Create an admin user
195-
npx nuxt-users create-user admin@example.com "Admin User" adminpass123 admin
195+
npx nuxt-users create-user -e admin@example.com -n "Admin User" -p adminpass123 -r admin
196196

197197
# Create an editor user
198-
npx nuxt-users create-user editor@example.com "Editor User" editorpass123 editor
198+
npx nuxt-users create-user -e editor@example.com -n "Editor User" -p editorpass123 -r editor
199199

200200
# Create a moderator user
201-
npx nuxt-users create-user moderator@example.com "Moderator User" modpass123 moderator
201+
npx nuxt-users create-user -e moderator@example.com -n "Moderator User" -p modpass123 -r moderator
202202
```
203203

204204
The default role is `user` if not specified.

docs/user-guide/getting-started.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ npx nuxt-users migrate
5454
### 4. Create Your First User
5555

5656
```bash
57-
npx nuxt-users create-user admin@example.com "Admin User" password123 admin
57+
npx nuxt-users create-user -e admin@example.com -n "Admin User" -p password123 -r admin
5858
```
5959

6060
> ⚠️ **IMPORTANT: Permissions Required for Protected Routes**

docs/user-guide/installation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ npx nuxt-users create-personal-access-tokens-table
9898
npx nuxt-users create-password-reset-tokens-table
9999

100100
# Create your first user
101-
npx nuxt-users create-user user@example.com "John Doe" password123
101+
npx nuxt-users create-user -e user@example.com -n "John Doe" -p password123
102102
```
103103

104104
## Next Steps

docs/user-guide/troubleshooting.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -158,17 +158,17 @@ sqlite3 data/users.sqlite3 ".schema users"
158158
npx nuxt-users list-users
159159

160160
# Or create a test user
161-
npx nuxt-users create-user test@example.com "Test User" password123
161+
npx nuxt-users create-user -e test@example.com -n "Test User" -p password123
162162
```
163163

164164
2. **Verify password hashing:**
165165
```bash
166166
# Passwords are automatically hashed - don't hash them manually
167167
# ❌ Wrong:
168-
npx nuxt-users create-user user@example.com "User" $(echo -n "password" | bcrypt)
168+
npx nuxt-users create-user -e user@example.com -n "User" -p $(echo -n "password" | bcrypt)
169169

170170
# ✅ Correct:
171-
npx nuxt-users create-user user@example.com "User" password123
171+
npx nuxt-users create-user -e user@example.com -n "User" -p password123
172172
```
173173

174174
3. **Check database connection:**

scripts/deploy-docs.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22

33
# Configuration
4-
SERVER_HOST="35.198.93.8"
4+
SERVER_HOST="34.159.83.210"
55
SERVER_USER="sravanam"
66
REMOTE_DOCS_PATH="/var/www/nuxt-users.webmania.cc"
77
LOCAL_BUILD_PATH="docs/.vitepress/dist"

0 commit comments

Comments
 (0)