feat: auth & admin
This commit is contained in:
@@ -12,9 +12,9 @@ When async operations have no interdependencies, execute them concurrently using
|
||||
**Incorrect (sequential execution, 3 round trips):**
|
||||
|
||||
```typescript
|
||||
const user = await fetchUser()
|
||||
const posts = await fetchPosts()
|
||||
const comments = await fetchComments()
|
||||
const user = await fetchUser();
|
||||
const posts = await fetchPosts();
|
||||
const comments = await fetchComments();
|
||||
```
|
||||
|
||||
**Correct (parallel execution, 1 round trip):**
|
||||
@@ -23,6 +23,6 @@ const comments = await fetchComments()
|
||||
const [user, posts, comments] = await Promise.all([
|
||||
fetchUser(),
|
||||
fetchPosts(),
|
||||
fetchComments()
|
||||
])
|
||||
fetchComments(),
|
||||
]);
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user