From e98697293aa518eb2b8799a5f8457e05a625f4da Mon Sep 17 00:00:00 2001 From: m5r Date: Tue, 3 Aug 2021 21:03:10 +0800 Subject: [PATCH] rename to shellphone --- .gitignore | 1 - app/core/layouts/base-layout.tsx | 2 +- app/onboarding/api/queue/set-twilio-webhooks.ts | 9 ++++++--- blitz.config.ts | 2 +- package-lock.json | 12 ++++++------ package.json | 2 +- 6 files changed, 15 insertions(+), 13 deletions(-) diff --git a/.gitignore b/.gitignore index e4329e1..d7e1864 100644 --- a/.gitignore +++ b/.gitignore @@ -53,4 +53,3 @@ lib-cov .vscode-test .idea/ - diff --git a/app/core/layouts/base-layout.tsx b/app/core/layouts/base-layout.tsx index 949cced..1f552fb 100644 --- a/app/core/layouts/base-layout.tsx +++ b/app/core/layouts/base-layout.tsx @@ -10,7 +10,7 @@ const BaseLayout = ({ title, children }: LayoutProps) => { return ( <> - {title || "virtual-phone"} + {title || "shellphone.app"} diff --git a/app/onboarding/api/queue/set-twilio-webhooks.ts b/app/onboarding/api/queue/set-twilio-webhooks.ts index 1716b2d..db821d1 100644 --- a/app/onboarding/api/queue/set-twilio-webhooks.ts +++ b/app/onboarding/api/queue/set-twilio-webhooks.ts @@ -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("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("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; diff --git a/blitz.config.ts b/blitz.config.ts index 143cab3..cbd984e 100644 --- a/blitz.config.ts +++ b/blitz.config.ts @@ -5,7 +5,7 @@ const withPWA = require("next-pwa"); const config: BlitzConfig = { middleware: [ sessionMiddleware({ - cookiePrefix: "virtual-phone-blitz", + cookiePrefix: "shellphone", isAuthorized: simpleRolesIsAuthorized, }), ], diff --git a/package-lock.json b/package-lock.json index 878a987..9024c1b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,5 +1,5 @@ { - "name": "virtual-phone", + "name": "shellphone.app", "version": "1.0.0", "lockfileVersion": 1, "requires": true, @@ -1567,7 +1567,7 @@ "integrity": "sha512-IHUfxSEDS9dDGqYwIW7wTN6tn/O8E0n5PcAHz9cAaBoZw6UpG20IG/YM3NNLaGPwPqgjBAFjIURzqoQs3rrtuw==" }, "@fortawesome/fontawesome-pro": { - "version": "file:../virtual-phone.blitz/fontawesome/fortawesome-fontawesome-pro-5.15.3.tgz", + "version": "file:./fontawesome/fortawesome-fontawesome-pro-5.15.3.tgz", "integrity": "sha512-zrIqXGUiKI/qyEbNJV2Zw084XF6npZR/wzYgqzbGhdRdOT3ZcdseiKUvmW5eUTEkoL9/mCdT8WIzHVvP8wfMsQ==" }, "@fortawesome/fontawesome-svg-core": { @@ -1603,28 +1603,28 @@ } }, "@fortawesome/pro-duotone-svg-icons": { - "version": "file:../virtual-phone.blitz/fontawesome/fortawesome-pro-duotone-svg-icons-5.15.3.tgz", + "version": "file:./fontawesome/fortawesome-pro-duotone-svg-icons-5.15.3.tgz", "integrity": "sha512-5BAT6uLAcYnsM76HLrP8SRuQh+N0eMy6VriEK9l9+6Xmm966wgXR2G9NZvua+W9qVv5GbPo2pXDqY6cUa/MoyA==", "requires": { "@fortawesome/fontawesome-common-types": "^0.2.35" } }, "@fortawesome/pro-light-svg-icons": { - "version": "file:../virtual-phone.blitz/fontawesome/fortawesome-pro-light-svg-icons-5.15.3.tgz", + "version": "file:./fontawesome/fortawesome-pro-light-svg-icons-5.15.3.tgz", "integrity": "sha512-HgQSTQIYsJku91yV/1txyr6IWfnQRnCNrqAo1UtPOkG53H7JPLO6l1GDsuhwjYJSIpjmqu7llgYAFOI/5cZWJA==", "requires": { "@fortawesome/fontawesome-common-types": "^0.2.35" } }, "@fortawesome/pro-regular-svg-icons": { - "version": "file:../virtual-phone.blitz/fontawesome/fortawesome-pro-regular-svg-icons-5.15.3.tgz", + "version": "file:./fontawesome/fortawesome-pro-regular-svg-icons-5.15.3.tgz", "integrity": "sha512-4CUIJWj+6ABnzYoYDECfB8hWHS/0FNeovaLqWZZMkaPfMGqC9tNSwWKZQUfBR2nwhEUeyMxtWo6mPJCh4Zz8YA==", "requires": { "@fortawesome/fontawesome-common-types": "^0.2.35" } }, "@fortawesome/pro-solid-svg-icons": { - "version": "file:../virtual-phone.blitz/fontawesome/fortawesome-pro-solid-svg-icons-5.15.3.tgz", + "version": "file:./fontawesome/fortawesome-pro-solid-svg-icons-5.15.3.tgz", "integrity": "sha512-stGmfbqLu54PghoxPjQ+BjblO/13EppJ8Fn9ceGZBz8K4lesvAhdMp2hZusXUz8VPuu/3pCHI84PbJ6wOKFYhQ==", "requires": { "@fortawesome/fontawesome-common-types": "^0.2.35" diff --git a/package.json b/package.json index 861f189..0ca74dd 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "virtual-phone", + "name": "shellphone.app", "version": "1.0.0", "scripts": { "dev": "concurrently --raw \"blitz dev\" 'quirrel'",