rename to shellphone
This commit is contained in:
@ -10,7 +10,7 @@ const BaseLayout = ({ title, children }: LayoutProps) => {
|
||||
return (
|
||||
<>
|
||||
<Head>
|
||||
<title>{title || "virtual-phone"}</title>
|
||||
<title>{title || "shellphone.app"}</title>
|
||||
<link rel="icon" href="/favicon.ico" />
|
||||
</Head>
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
import { getConfig } from "blitz";
|
||||
import { Queue } from "quirrel/blitz";
|
||||
import twilio from "twilio";
|
||||
|
||||
@ -7,6 +8,8 @@ type Payload = {
|
||||
customerId: string;
|
||||
};
|
||||
|
||||
const { serverRuntimeConfig } = getConfig();
|
||||
|
||||
const setTwilioWebhooks = Queue<Payload>("api/queue/set-twilio-webhooks", async ({ customerId }) => {
|
||||
const [customer, phoneNumber] = await Promise.all([
|
||||
db.customer.findFirst({ where: { id: customerId } }),
|
||||
@ -19,10 +22,10 @@ const setTwilioWebhooks = Queue<Payload>("api/queue/set-twilio-webhooks", async
|
||||
const twimlApp = customer.twimlAppSid
|
||||
? await twilio(customer.accountSid, customer.authToken).applications.get(customer.twimlAppSid).fetch()
|
||||
: await twilio(customer.accountSid, customer.authToken).applications.create({
|
||||
friendlyName: "Virtual Phone",
|
||||
smsUrl: "https://phone.mokhtar.dev/api/webhook/incoming-message",
|
||||
friendlyName: "Shellphone",
|
||||
smsUrl: `https://${serverRuntimeConfig.app.baseUrl}/api/webhook/incoming-message`,
|
||||
smsMethod: "POST",
|
||||
voiceUrl: "https://phone.mokhtar.dev/api/webhook/incoming-call",
|
||||
voiceUrl: `https://${serverRuntimeConfig.app.baseUrl}/api/webhook/incoming-call`,
|
||||
voiceMethod: "POST",
|
||||
});
|
||||
const twimlAppSid = twimlApp.sid;
|
||||
|
Reference in New Issue
Block a user