看起来 2.5.0.beta3 版本已于 2020 年 4 月 22 日 发布,而我为 此问题 所做的修复已于 2020 年 4 月 14 日 发布。因此,您应该能够通过 API 使用单个请求创建活跃用户。
请验证您的请求和响应是否与以下 curl 命令类似:
curl -i -sS -X POST "http://localhost:3000/users" \
-H "Content-Type: multipart/form-data;" \
-H "Api-Key: 079fb2bb12d3b436bb11bde8eb58aaa9a36560fa7d79b14b3087aa40b1ebc2c4" \
-H "Api-Username: blake.erickson" \
-F "name=8fe87241ca91a69f5ccd" \
-F "username=8fe87241ca91a69f5ccd" \
-F "email=8fe87241ca91a69f5ccd@example.com" \
-F "password=c9193506a8f5e402a88cf2f8cee3f258" \
-F "active=true" \
-F "approved=true"
HTTP/1.1 200 OK
{
"success": true,
"active": true,
"message": "您的账户已激活,可以开始使用。",
"user_id": 10
}