mirror of
https://github.com/freedbygrace/DynamoDNS.git
synced 2026-07-27 20:08:56 +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
|
||||
const addDomainMutation = useMutation({
|
||||
mutationFn: async (data: z.infer<typeof domainFormSchema>) => {
|
||||
// Prepare domain data with organizationId
|
||||
// Prepare domain data with customerId
|
||||
const domainData: InsertDomain = {
|
||||
...data,
|
||||
organizationId: currentOrganization?.id || "",
|
||||
customerId: currentCustomer?.id || "",
|
||||
};
|
||||
|
||||
// Add special handling for providerId
|
||||
@@ -111,7 +111,7 @@ export default function DomainsPage() {
|
||||
return await res.json();
|
||||
},
|
||||
onSuccess: () => {
|
||||
queryClient.invalidateQueries({ queryKey: ["/api/domains", currentOrganization?.id] });
|
||||
queryClient.invalidateQueries({ queryKey: ["/api/domains", currentCustomer?.id] });
|
||||
setIsAddDomainDialogOpen(false);
|
||||
form.reset();
|
||||
toast({
|
||||
@@ -134,7 +134,7 @@ export default function DomainsPage() {
|
||||
await apiRequest("DELETE", `/api/domains/${domainId}`);
|
||||
},
|
||||
onSuccess: () => {
|
||||
queryClient.invalidateQueries({ queryKey: ["/api/domains", currentOrganization?.id] });
|
||||
queryClient.invalidateQueries({ queryKey: ["/api/domains", currentCustomer?.id] });
|
||||
setIsDeleteDialogOpen(false);
|
||||
setSelectedDomain(null);
|
||||
toast({
|
||||
|
||||
Reference in New Issue
Block a user