Skip to content

Commit f01f96d

Browse files
author
CodeBuddy Attribution Bot
committed
fix(attribution): CloudBase JS SDK API 返回结构不清晰,导致文章创建后无法正确获取文档 ID (issue_mnpr3lei_r3vw5t)
1 parent 15f546d commit f01f96d

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

  • config/source/guideline/cloudbase

config/source/guideline/cloudbase/SKILL.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,7 @@ Prefer long-term memory when available: write the scenarios and working rules th
221221
2. **Authentication**: Read the `auth-web` and `auth-tool` skills - Use Web SDK built-in authentication
222222
3. **Database**:
223223
- NoSQL: `no-sql-web-sdk` skill
224+
- Web SDK create-result reminder: after `db.collection(...).add(...)`, the new document ID is `result.id`
224225
- MySQL: `relational-database-web` and `relational-database-tool` skills
225226
4. **UI Design** (Recommended): Read the `ui-design` skill for better UI/UX design guidelines
226227
5. **Quick SDK reference**:
@@ -263,6 +264,7 @@ Prefer long-term memory when available: write the scenarios and working rules th
263264

264265
**Web Projects:**
265266
- NoSQL Database: Refer to the `no-sql-web-sdk` skill
267+
- For CloudBase Web SDK `db.collection(...).add(...)`, read the created document ID from `result.id`, not `result.data.id`, `_id`, or `insertedId`
266268
- MySQL Relational Database: Refer to the `relational-database-web` skill (Web) and `relational-database-tool` skill (Management)
267269

268270
**Mini Program Projects:**

0 commit comments

Comments
 (0)