mirror of
https://github.com/freedbygrace/DynamoDNS.git
synced 2026-08-10 18:26:52 +00:00
Update domain management and authentication to use UUIDs
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/907f8f47-8c31-43c0-b0c7-3d158b1eb9a1.jpg
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { useState } from "react";
|
||||
import { useQuery } from "@tanstack/react-query";
|
||||
import { Domain } from "@shared/schema";
|
||||
import { Domain, Provider } from "@shared/schema";
|
||||
import { Link } from "wouter";
|
||||
import { useOrganization } from "@/context/organization-context";
|
||||
import { Pagination } from "@/components/shared/pagination";
|
||||
@@ -38,16 +38,16 @@ export function DomainTable({ onManageDomain, onDeleteDomain }: DomainTableProps
|
||||
});
|
||||
|
||||
// Get providers to display provider names
|
||||
const { data: providers = [] } = useQuery({
|
||||
const { data: providers = [] } = useQuery<Provider[]>({
|
||||
queryKey: ["/api/providers"],
|
||||
});
|
||||
|
||||
const getProviderName = (providerId: number) => {
|
||||
const getProviderName = (providerId: string) => {
|
||||
const provider = providers.find(p => p.id === providerId);
|
||||
return provider?.name || "Unknown";
|
||||
};
|
||||
|
||||
const getProviderIcon = (providerId: number) => {
|
||||
const getProviderIcon = (providerId: string) => {
|
||||
const provider = providers.find(p => p.id === providerId);
|
||||
|
||||
if (!provider) return <CircleHelp className="mr-2 text-primary" size={16} />;
|
||||
@@ -175,7 +175,7 @@ export function DomainTable({ onManageDomain, onDeleteDomain }: DomainTableProps
|
||||
</TableCell>
|
||||
<TableCell>
|
||||
<Link href={`/dns-records?domainId=${domain.id}`}>
|
||||
<a className="text-primary hover:underline">View Records</a>
|
||||
<div className="text-primary hover:underline cursor-pointer">View Records</div>
|
||||
</Link>
|
||||
</TableCell>
|
||||
<TableCell>
|
||||
|
||||
@@ -24,7 +24,7 @@ const registerSchema = z.object({
|
||||
email: z.string().email("Please enter a valid email"),
|
||||
password: z.string().min(8, "Password must be at least 8 characters"),
|
||||
fullName: z.string().optional(),
|
||||
organizationId: z.number().optional(),
|
||||
organizationId: z.string().optional(),
|
||||
});
|
||||
|
||||
export default function AuthPage() {
|
||||
@@ -212,8 +212,8 @@ export default function AuthPage() {
|
||||
<FormControl>
|
||||
<Select
|
||||
disabled={orgsLoading}
|
||||
onValueChange={(value) => field.onChange(parseInt(value))}
|
||||
value={field.value?.toString() || ""}
|
||||
onValueChange={(value) => field.onChange(value)}
|
||||
value={field.value || ""}
|
||||
>
|
||||
<SelectTrigger>
|
||||
<SelectValue placeholder="Select an organization (optional)" />
|
||||
|
||||
Reference in New Issue
Block a user