mirror of
https://github.com/freedbygrace/DynamoDNS.git
synced 2026-08-31 20:58:05 +00:00
Update domain management to use customer ID instead of organization ID.
Replit-Commit-Author: Agent Replit-Commit-Session-Id: 9111ef36-26c8-4085-84ca-a35dc1fec1b5 Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/7083d608-d6d3-4a6a-9a27-6286c5109627/1207d7c5-7360-4adb-8bd7-8080d892e64d.jpg
This commit is contained in:
@@ -92,10 +92,10 @@ export default function DomainsPage() {
|
|||||||
// Add domain mutation
|
// Add domain mutation
|
||||||
const addDomainMutation = useMutation({
|
const addDomainMutation = useMutation({
|
||||||
mutationFn: async (data: z.infer<typeof domainFormSchema>) => {
|
mutationFn: async (data: z.infer<typeof domainFormSchema>) => {
|
||||||
// Prepare domain data with organizationId
|
// Prepare domain data with customerId
|
||||||
const domainData: InsertDomain = {
|
const domainData: InsertDomain = {
|
||||||
...data,
|
...data,
|
||||||
organizationId: currentOrganization?.id || "",
|
customerId: currentCustomer?.id || "",
|
||||||
};
|
};
|
||||||
|
|
||||||
// Add special handling for providerId
|
// Add special handling for providerId
|
||||||
@@ -111,7 +111,7 @@ export default function DomainsPage() {
|
|||||||
return await res.json();
|
return await res.json();
|
||||||
},
|
},
|
||||||
onSuccess: () => {
|
onSuccess: () => {
|
||||||
queryClient.invalidateQueries({ queryKey: ["/api/domains", currentOrganization?.id] });
|
queryClient.invalidateQueries({ queryKey: ["/api/domains", currentCustomer?.id] });
|
||||||
setIsAddDomainDialogOpen(false);
|
setIsAddDomainDialogOpen(false);
|
||||||
form.reset();
|
form.reset();
|
||||||
toast({
|
toast({
|
||||||
@@ -134,7 +134,7 @@ export default function DomainsPage() {
|
|||||||
await apiRequest("DELETE", `/api/domains/${domainId}`);
|
await apiRequest("DELETE", `/api/domains/${domainId}`);
|
||||||
},
|
},
|
||||||
onSuccess: () => {
|
onSuccess: () => {
|
||||||
queryClient.invalidateQueries({ queryKey: ["/api/domains", currentOrganization?.id] });
|
queryClient.invalidateQueries({ queryKey: ["/api/domains", currentCustomer?.id] });
|
||||||
setIsDeleteDialogOpen(false);
|
setIsDeleteDialogOpen(false);
|
||||||
setSelectedDomain(null);
|
setSelectedDomain(null);
|
||||||
toast({
|
toast({
|
||||||
|
|||||||
Reference in New Issue
Block a user