@pixelbyte-software/pixcode 1.55.10 → 1.55.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/server/routes/user.js +16 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pixelbyte-software/pixcode",
|
|
3
|
-
"version": "1.55.
|
|
3
|
+
"version": "1.55.11",
|
|
4
4
|
"description": "Self-hosted AI coding agent control room for Claude Code, Cursor CLI, OpenAI Codex, Gemini CLI, Qwen Code, and OpenCode with chat, files, shell, Git, orchestration, API keys, Telegram, MCP, plugins, themes, and desktop/server deployment.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist-server/server/index.js",
|
package/server/routes/user.js
CHANGED
|
@@ -107,10 +107,23 @@ router.post('/complete-onboarding', authenticateToken, async (req, res) => {
|
|
|
107
107
|
}
|
|
108
108
|
});
|
|
109
109
|
|
|
110
|
-
|
|
110
|
+
// Onboarding status is public — it is needed during initial setup
|
|
111
|
+
// BEFORE any users exist or any token is issued. When no users exist
|
|
112
|
+
// we return needsSetup: true so the frontend can show the registration
|
|
113
|
+
// screen. When users DO exist we return the actual onboarding state.
|
|
114
|
+
router.get('/onboarding-status', async (req, res) => {
|
|
111
115
|
try {
|
|
112
|
-
const
|
|
113
|
-
|
|
116
|
+
const hasUsers = userDb.hasUsers();
|
|
117
|
+
if (!hasUsers) {
|
|
118
|
+
return res.json({ success: true, needsSetup: true, hasCompletedOnboarding: false });
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
// Users exist — token is required for detailed info
|
|
122
|
+
if (!req.user) {
|
|
123
|
+
return res.json({ success: true, needsSetup: false, hasCompletedOnboarding: true });
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
const hasCompleted = userDb.hasCompletedOnboarding(req.user.id);
|
|
114
127
|
|
|
115
128
|
res.json({
|
|
116
129
|
success: true,
|