diff --git a/app/api/queue/fetch-messages.ts b/app/messages/api/queue/fetch-messages.ts similarity index 96% rename from app/api/queue/fetch-messages.ts rename to app/messages/api/queue/fetch-messages.ts index f7c5c40..db2ae4f 100644 --- a/app/api/queue/fetch-messages.ts +++ b/app/messages/api/queue/fetch-messages.ts @@ -1,7 +1,7 @@ import { Queue } from "quirrel/blitz"; import twilio from "twilio"; -import db from "../../../db"; +import db from "../../../../db"; import insertMessagesQueue from "./insert-messages"; type Payload = { diff --git a/app/api/queue/insert-messages.ts b/app/messages/api/queue/insert-messages.ts similarity index 97% rename from app/api/queue/insert-messages.ts rename to app/messages/api/queue/insert-messages.ts index babfe53..a074a14 100644 --- a/app/api/queue/insert-messages.ts +++ b/app/messages/api/queue/insert-messages.ts @@ -1,8 +1,8 @@ import { Queue } from "quirrel/blitz"; import type { MessageInstance } from "twilio/lib/rest/api/v2010/account/message"; -import db, { MessageStatus, Direction, Message } from "../../../db"; -import { encrypt } from "../../../db/_encryption"; +import db, { MessageStatus, Direction, Message } from "../../../../db"; +import { encrypt } from "../../../../db/_encryption"; type Payload = { customerId: string; diff --git a/app/api/queue/send-message.ts b/app/messages/api/queue/send-message.ts similarity index 96% rename from app/api/queue/send-message.ts rename to app/messages/api/queue/send-message.ts index 4a98e4c..a8ec8c1 100644 --- a/app/api/queue/send-message.ts +++ b/app/messages/api/queue/send-message.ts @@ -1,7 +1,7 @@ import { Queue } from "quirrel/blitz"; import twilio from "twilio"; -import db from "../../../db"; +import db from "../../../../db"; type Payload = { id: string; diff --git a/app/messages/components/new-message-area.tsx b/app/messages/components/new-message-area.tsx index 887abf4..0e87568 100644 --- a/app/messages/components/new-message-area.tsx +++ b/app/messages/components/new-message-area.tsx @@ -1,7 +1,7 @@ import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { faPaperPlane } from "@fortawesome/pro-regular-svg-icons"; import { useForm } from "react-hook-form"; -import { useMutation, useQuery, useRouter } from "blitz"; +import { useMutation, useQuery } from "blitz"; import sendMessage from "../mutations/send-message"; import { Direction, Message, MessageStatus } from "../../../db"; diff --git a/app/messages/mutations/send-message.ts b/app/messages/mutations/send-message.ts index 71820c4..f07c321 100644 --- a/app/messages/mutations/send-message.ts +++ b/app/messages/mutations/send-message.ts @@ -6,7 +6,7 @@ import db, { Direction, MessageStatus } from "../../../db"; import getCurrentCustomer from "../../customers/queries/get-current-customer"; import getCustomerPhoneNumber from "../../phone-numbers/queries/get-customer-phone-number"; import { encrypt } from "../../../db/_encryption"; -import sendMessageQueue from "../../api/queue/send-message"; +import sendMessageQueue from "../../messages/api/queue/send-message"; import appLogger from "../../../integrations/logger"; const logger = appLogger.child({ mutation: "send-message" }); diff --git a/app/api/queue/set-twilio-webhooks.ts b/app/onboarding/api/queue/set-twilio-webhooks.ts similarity index 97% rename from app/api/queue/set-twilio-webhooks.ts rename to app/onboarding/api/queue/set-twilio-webhooks.ts index 153dec0..4940476 100644 --- a/app/api/queue/set-twilio-webhooks.ts +++ b/app/onboarding/api/queue/set-twilio-webhooks.ts @@ -1,7 +1,7 @@ import { Queue } from "quirrel/blitz"; import twilio from "twilio"; -import db from "../../../db"; +import db from "../../../../db"; type Payload = { customerId: string; diff --git a/app/onboarding/mutations/set-phone-number.ts b/app/onboarding/mutations/set-phone-number.ts index b10280d..4538f60 100644 --- a/app/onboarding/mutations/set-phone-number.ts +++ b/app/onboarding/mutations/set-phone-number.ts @@ -4,9 +4,9 @@ import twilio from "twilio"; import db from "../../../db"; import getCurrentCustomer from "../../customers/queries/get-current-customer"; -import fetchMessagesQueue from "../../api/queue/fetch-messages"; -import fetchCallsQueue from "../../api/queue/fetch-calls"; -import setTwilioWebhooks from "../../api/queue/set-twilio-webhooks"; +import fetchMessagesQueue from "../../messages/api/queue/fetch-messages"; +import fetchCallsQueue from "../../phone-calls/api/queue/fetch-calls"; +import setTwilioWebhooks from "../api/queue/set-twilio-webhooks"; const Body = z.object({ phoneNumberSid: z.string(), diff --git a/app/api/queue/fetch-calls.ts b/app/phone-calls/api/queue/fetch-calls.ts similarity index 96% rename from app/api/queue/fetch-calls.ts rename to app/phone-calls/api/queue/fetch-calls.ts index 48ebd23..51e2c08 100644 --- a/app/api/queue/fetch-calls.ts +++ b/app/phone-calls/api/queue/fetch-calls.ts @@ -1,7 +1,7 @@ import { Queue } from "quirrel/blitz"; import twilio from "twilio"; -import db from "../../../db"; +import db from "../../../../db"; import insertCallsQueue from "./insert-calls"; type Payload = { diff --git a/app/api/queue/insert-calls.ts b/app/phone-calls/api/queue/insert-calls.ts similarity index 95% rename from app/api/queue/insert-calls.ts rename to app/phone-calls/api/queue/insert-calls.ts index 00a2571..67ce0a2 100644 --- a/app/api/queue/insert-calls.ts +++ b/app/phone-calls/api/queue/insert-calls.ts @@ -1,7 +1,7 @@ import { Queue } from "quirrel/blitz"; import type { CallInstance } from "twilio/lib/rest/api/v2010/account/call"; -import db, { Direction, CallStatus } from "../../../db"; +import db, { Direction, CallStatus } from "../../../../db"; type Payload = { customerId: string;