fix: trim whitespace from network sync URL and API key; clarify source URL format in UI
Copy-paste often adds trailing whitespace that breaks the API key comparison. Updated placeholder and description to show the correct URL format (no port number). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -574,7 +574,12 @@ router.get("/network-sync-config", (req, res) => {
|
||||
router.put("/network-sync-config", (req: Request, res: Response): any => {
|
||||
if (!req.user?.id) return res.status(401).json({ error: "Unauthorized" });
|
||||
const { enabled, syncHour, sourceUrl, apiKey } = req.body;
|
||||
const updated = writeSyncConfig({ enabled, syncHour, sourceUrl, apiKey });
|
||||
const updated = writeSyncConfig({
|
||||
enabled,
|
||||
syncHour,
|
||||
sourceUrl: typeof sourceUrl === "string" ? sourceUrl.trim() : sourceUrl,
|
||||
apiKey: typeof apiKey === "string" ? apiKey.trim() : apiKey,
|
||||
});
|
||||
res.json(updated);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user