rename to shellphone

This commit is contained in:
m5r 2021-08-03 21:03:10 +08:00
parent 002c3ad37f
commit e98697293a
6 changed files with 15 additions and 13 deletions

1
.gitignore vendored
View File

@ -53,4 +53,3 @@ lib-cov
.vscode-test
.idea/

View File

@ -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>

View File

@ -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;

View File

@ -5,7 +5,7 @@ const withPWA = require("next-pwa");
const config: BlitzConfig = {
middleware: [
sessionMiddleware({
cookiePrefix: "virtual-phone-blitz",
cookiePrefix: "shellphone",
isAuthorized: simpleRolesIsAuthorized,
}),
],

12
package-lock.json generated
View File

@ -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"

View File

@ -1,5 +1,5 @@
{
"name": "virtual-phone",
"name": "shellphone.app",
"version": "1.0.0",
"scripts": {
"dev": "concurrently --raw \"blitz dev\" 'quirrel'",