Skip to content

Commit b472716

Browse files
aaf2tbzclaude
andcommitted
fix: wire marketplace reviews sync to production Worker endpoint
- Set DEFAULT_CONFIG.endpointUrl to the production Cloudflare Worker URL (reviews.signetai.sh) so new installs are pre-configured - Add X-Signet-Sync: 1 header to outbound sync requests — required by the Worker as a lightweight origin gate - sync remains opt-in (enabled: false default) until Nicholai deploys the Worker; TODO comment marks where to flip the default Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 737601a commit b472716

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

packages/daemon/src/routes/marketplace-reviews.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,14 @@ interface ReviewsSyncConfig {
2727
readonly lastSyncError: string | null;
2828
}
2929

30+
// Production sync endpoint — set by Nicholai after deploying the Cloudflare Worker.
31+
// Until then, users can override via PATCH /api/marketplace/reviews/config.
32+
// TODO: replace placeholder with live Worker URL once deployed.
33+
const REVIEWS_SYNC_URL = "https://reviews.signetai.sh/api/reviews/sync";
34+
3035
const DEFAULT_CONFIG: ReviewsSyncConfig = {
3136
enabled: false,
32-
endpointUrl: "",
37+
endpointUrl: REVIEWS_SYNC_URL,
3338
lastSyncAt: null,
3439
lastSyncError: null,
3540
};
@@ -344,7 +349,7 @@ export function mountMarketplaceReviewsRoutes(app: Hono): void {
344349
try {
345350
const response = await fetch(config.endpointUrl, {
346351
method: "POST",
347-
headers: { "Content-Type": "application/json" },
352+
headers: { "Content-Type": "application/json", "X-Signet-Sync": "1" },
348353
body: JSON.stringify({
349354
source: "signet-marketplace",
350355
type: "reviews-sync",

0 commit comments

Comments
 (0)