antenna-fyi 1.3.14 → 1.3.16
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/lib/core.js +22 -1
- package/package.json +1 -1
package/lib/core.js
CHANGED
|
@@ -295,7 +295,28 @@ export async function setProfile({
|
|
|
295
295
|
console.error("Embedding generation failed (non-fatal):", e.message);
|
|
296
296
|
}
|
|
297
297
|
|
|
298
|
-
|
|
298
|
+
// Read back profile to get slug for public page link
|
|
299
|
+
let publicUrl = null;
|
|
300
|
+
let bindUrl = null;
|
|
301
|
+
try {
|
|
302
|
+
const profile = await getProfile({ device_id, supabaseUrl, supabaseKey });
|
|
303
|
+
if (profile?.profile_slug) {
|
|
304
|
+
publicUrl = `https://www.antenna.fyi/p/${profile.profile_slug}`;
|
|
305
|
+
}
|
|
306
|
+
} catch {}
|
|
307
|
+
|
|
308
|
+
// Auto-generate GPS bind link
|
|
309
|
+
try {
|
|
310
|
+
const bind = await createBindToken({ device_id, supabaseUrl, supabaseKey });
|
|
311
|
+
bindUrl = bind.url;
|
|
312
|
+
} catch {}
|
|
313
|
+
|
|
314
|
+
return {
|
|
315
|
+
...data,
|
|
316
|
+
public_url: publicUrl,
|
|
317
|
+
gps_bind_url: bindUrl,
|
|
318
|
+
next_step: "Send the public_url and gps_bind_url to the user. The GPS link should be opened on their phone to share location.",
|
|
319
|
+
};
|
|
299
320
|
}
|
|
300
321
|
|
|
301
322
|
// ─── accept ──────────────────────────────────────────────────────────
|