fix: resolve type errors and lint components/routes
This commit is contained in:
parent
414b95c293
commit
6745ee8529
13 changed files with 63 additions and 28 deletions
|
|
@ -48,7 +48,7 @@ export default function Nameservers({ nameservers, isDisabled }: Props) {
|
|||
interface ListProps {
|
||||
isGlobal: boolean;
|
||||
isDisabled: boolean;
|
||||
nameservers: string[];
|
||||
nameservers: Record<string, string[]>;
|
||||
name: string;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -43,22 +43,22 @@ export async function loader() {
|
|||
export async function action({ request }: ActionFunctionArgs) {
|
||||
const session = await getSession(request.headers.get('Cookie'));
|
||||
if (!session.has('hsApiKey')) {
|
||||
return send({ success: false }, 401);
|
||||
return data({ success: false }, { status: 401 });
|
||||
}
|
||||
|
||||
const context = await loadContext();
|
||||
if (!context.config.write) {
|
||||
return send({ success: false }, 403);
|
||||
return data({ success: false }, { status: 403 });
|
||||
}
|
||||
|
||||
const data = (await request.json()) as Record<string, unknown>;
|
||||
await patchConfig(data);
|
||||
const patch = (await request.json()) as Record<string, unknown>;
|
||||
await patchConfig(patch);
|
||||
|
||||
if (context.integration?.onConfigChange) {
|
||||
await context.integration.onConfigChange(context.integration.context);
|
||||
}
|
||||
|
||||
return { success: true };
|
||||
return data({ success: true });
|
||||
}
|
||||
|
||||
export default function Page() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue