diff --git a/.env.example b/.env.example index 7138de2a..b00b4c7e 100644 --- a/.env.example +++ b/.env.example @@ -19,7 +19,7 @@ NEXT_PUBLIC_HUB_URL= NEXT_PUBLIC_HUB_SERVER_URL= NEXT_PUBLIC_DISPATCH_URL= NEXT_PUBLIC_DISPATCH_SERVER_URL= -DISCORD_SERVER_URL= +CORE_SERVER_URL= NEXT_PUBLIC_ESRI_ACCESS_TOKEN= diff --git a/apps/dispatch-server/.env.example b/apps/dispatch-server/.env.example index e47830a1..e6706f70 100644 --- a/apps/dispatch-server/.env.example +++ b/apps/dispatch-server/.env.example @@ -1,7 +1,7 @@ DISPATCH_SERVER_PORT=3002 REDIS_HOST=localhost REDIS_PORT=6379 -DISCORD_SERVER_URL=http://core-server +CORE_SERVER_URL=http://core-server DISPATCH_APP_TOKEN=dispatch LIVEKIT_API_KEY=APIAnsGdtdYp2Ho LIVEKIT_API_SECRET=tdPjVsYUx8ddC7K9NvdmVAeLRF9GeADD6Fedm1x63fWC \ No newline at end of file diff --git a/apps/dispatch-server/modules/discord.ts b/apps/dispatch-server/modules/discord.ts index 335d594f..e8a0fb4e 100644 --- a/apps/dispatch-server/modules/discord.ts +++ b/apps/dispatch-server/modules/discord.ts @@ -1,7 +1,7 @@ import axios from "axios"; const discordAxiosClient = axios.create({ - baseURL: process.env.DISCORD_SERVER_URL || "https://discord.com/api/v10", + baseURL: process.env.CORE_SERVER_URL, }); export const renameMember = async (memberId: string, newName: string) => { diff --git a/apps/dispatch-server/routes/report.ts b/apps/dispatch-server/routes/report.ts index a5861506..8bbeb94e 100644 --- a/apps/dispatch-server/routes/report.ts +++ b/apps/dispatch-server/routes/report.ts @@ -10,8 +10,6 @@ router.put("/", async (req, res) => { const report = await prisma.report.create({ data: req.body, }); - - // TODO: send link to report on admin page to user sendReportEmbed(report.id).catch((error) => { console.error("Error sending report embed to Discord:", error); }); diff --git a/apps/dispatch/app/(app)/dispatch/_components/pannel/MissionForm.tsx b/apps/dispatch/app/(app)/dispatch/_components/pannel/MissionForm.tsx index a759a587..6eb676e4 100644 --- a/apps/dispatch/app/(app)/dispatch/_components/pannel/MissionForm.tsx +++ b/apps/dispatch/app/(app)/dispatch/_components/pannel/MissionForm.tsx @@ -46,11 +46,6 @@ export const MissionForm = () => { refetchInterval: 10000, }); - const { data: stations } = useQuery({ - queryKey: ["stations"], - queryFn: () => getStationsAPI(), - }); - const createMissionMutation = useMutation({ mutationFn: createMissionAPI, mutationKey: ["missions"], @@ -292,6 +287,7 @@ export const MissionForm = () => { form.setValue("missionKeywordAbbreviation", "VL_S"); form.setValue("hpgMissionString", "Verlegung:4_1_1_1-4_1"); } else { + form.setValue("missionKeywordCategory", "V_VERLEGUNG"); form.setValue("missionKeywordAbbreviation", null as any); form.setValue("hpgMissionString", null); } diff --git a/apps/hub-server/modules/discord.ts b/apps/hub-server/modules/discord.ts index 248c53ea..e36f3430 100644 --- a/apps/hub-server/modules/discord.ts +++ b/apps/hub-server/modules/discord.ts @@ -1,7 +1,7 @@ import axios from "axios"; const discordAxiosClient = axios.create({ - baseURL: process.env.DISCORD_SERVER_URL || "https://discord.com/api/v10", + baseURL: process.env.CORE_SERVER_URL || "https://discord.com/api/v10", }); export const renameMember = async (memberId: string, newName: string) => { diff --git a/apps/hub/helper/discord.ts b/apps/hub/helper/discord.ts index b70106bd..a9a6b9d4 100644 --- a/apps/hub/helper/discord.ts +++ b/apps/hub/helper/discord.ts @@ -2,7 +2,7 @@ import axios from "axios"; const discordAxiosClient = axios.create({ - baseURL: process.env.DISCORD_SERVER_URL || "http://localhost:3005", + baseURL: process.env.CORE_SERVER_URL || "http://localhost:3005", }); export const renameMember = async (memberId: string, newName: string) => {