Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions sites/build.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -1117,7 +1117,8 @@ export default {
if (p === "/api/book" && request.method === "POST") {
try {
const data = await request.json();
await fireAlert(env, { kind: "booking", site: SITE_ID, ...data });
const { name, phone, vehicle, notes, timestamp } = data;
await fireAlert(env, { kind: "booking", site: SITE_ID, name, phone, vehicle, notes, timestamp });
return new Response(JSON.stringify({ ok: true }), { headers: { "Content-Type": "application/json", "Access-Control-Allow-Origin": "*" } });
} catch (e) {
return new Response(JSON.stringify({ ok: false, error: e.message }), { status: 400, headers: { "Content-Type": "application/json" } });
Expand All @@ -1126,7 +1127,8 @@ export default {
if (p === "/api/intake" && request.method === "POST") {
try {
const data = await request.json();
await fireAlert(env, { kind: "intake", site: SITE_ID, ...data });
const { client_name, client_phone, client_email, matter_type, summary, urgency, area, timestamp } = data;
await fireAlert(env, { kind: "intake", site: SITE_ID, client_name, client_phone, client_email, matter_type, summary, urgency, area, timestamp });
return new Response(JSON.stringify({ ok: true }), { headers: { "Content-Type": "application/json", "Access-Control-Allow-Origin": "*" } });
} catch (e) {
return new Response(JSON.stringify({ ok: false, error: e.message }), { status: 400, headers: { "Content-Type": "application/json" } });
Expand All @@ -1135,7 +1137,8 @@ export default {
if (p === "/api/chat" && request.method === "POST") {
try {
const data = await request.json();
await fireAlert(env, { kind: "chat", site: SITE_ID, ...data });
const { message, sessionId, timestamp } = data;
await fireAlert(env, { kind: "chat", site: SITE_ID, message, sessionId, timestamp });
const msg = (data.message || "").toLowerCase();
let reply;
if (VERTICAL === "law") {
Expand Down
9 changes: 6 additions & 3 deletions sites/dist/carb-clean-truck-check/worker.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 6 additions & 3 deletions sites/dist/carbteststockton/worker.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 8 additions & 5 deletions sites/dist/chigbulaws/worker.js

Large diffs are not rendered by default.

9 changes: 6 additions & 3 deletions sites/dist/cleantruckcheck-fairfield/worker.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 6 additions & 3 deletions sites/dist/cleantruckcheck-hayward/worker.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 6 additions & 3 deletions sites/dist/cleantruckcheck-lodi/worker.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 6 additions & 3 deletions sites/dist/cleantruckcheck-roseville/worker.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 6 additions & 3 deletions sites/dist/cleantruckcheck-stockton/worker.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 6 additions & 3 deletions sites/dist/mobilecarbsmoketest/worker.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 6 additions & 3 deletions sites/dist/mobilecarbtest/worker.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading