diff --git a/Cargo.lock b/Cargo.lock index b17e1653..aae7ad8f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1879,6 +1879,7 @@ dependencies = [ "clap 4.3.19", "sea-orm", "sea-orm-migration", + "serde_json", "thiserror", "time", "tracing", diff --git a/app/src/ApiClient.ts b/app/src/ApiClient.ts index 84534a93..8f35580b 100644 --- a/app/src/ApiClient.ts +++ b/app/src/ApiClient.ts @@ -117,10 +117,8 @@ export interface Aggregator { } export interface NewAggregator { - role: Role; name: string; api_url: string; - dap_url: string; bearer_token: string; is_first_party?: boolean; } @@ -422,6 +420,10 @@ function errorToMessage({ message, code, params }: ValidationError) { return "must be base64"; } else if (code === "same") { return "must not be the same"; + } else if (code === "token-not-recognized") { + return "bearer token not recognized"; + } else if (code === "http-error") { + return "error connecting to url"; } else if (code === "enum" && Array.isArray(params.values)) { return `must be one of these values: ${params.values.join(", ")}`; } else if (code === "length") { diff --git a/app/src/aggregators/AggregatorForm.tsx b/app/src/aggregators/AggregatorForm.tsx index 1b621645..f3016701 100644 --- a/app/src/aggregators/AggregatorForm.tsx +++ b/app/src/aggregators/AggregatorForm.tsx @@ -69,10 +69,8 @@ export function AggregatorForm({ errors={errors} initialValues={ { - role: "either", name: "", api_url: "", - dap_url: "", bearer_token: "", is_first_party: showIsFirstParty ? true : undefined, } as NewAggregator @@ -86,10 +84,8 @@ export function AggregatorForm({ noValidate autoComplete="off" > - - {showIsFirstParty ? : null}