mirror of
https://github.com/Xevion/rdap.git
synced 2025-12-06 23:15:59 -06:00
Properly set target from SubmitProps
This commit is contained in:
@@ -6,6 +6,7 @@ import type {
|
|||||||
IpNetwork,
|
IpNetwork,
|
||||||
Register,
|
Register,
|
||||||
RootRegistryType,
|
RootRegistryType,
|
||||||
|
SubmitProps,
|
||||||
TargetType,
|
TargetType,
|
||||||
} from "@/types";
|
} from "@/types";
|
||||||
import { registryURLs } from "@/constants";
|
import { registryURLs } from "@/constants";
|
||||||
@@ -172,8 +173,11 @@ const useLookup = (warningHandler?: WarningHandler) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async function submit(): Promise<ParsedGeneric | undefined> {
|
async function submit(
|
||||||
|
props: SubmitProps
|
||||||
|
): Promise<ParsedGeneric | undefined> {
|
||||||
try {
|
try {
|
||||||
|
setTarget(props.target);
|
||||||
const response = await submitInternal();
|
const response = await submitInternal();
|
||||||
if (response == undefined)
|
if (response == undefined)
|
||||||
throw new Error("Internal submission failed to yield any data.");
|
throw new Error("Internal submission failed to yield any data.");
|
||||||
|
|||||||
Reference in New Issue
Block a user