mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
Allow null description field value to round trip from server (#142540)
This commit is contained in:
parent
8e770bb608
commit
bcfa351f06
3 changed files with 6 additions and 8 deletions
|
@ -16,17 +16,15 @@ export type PutConnectorNameAndDescriptionArgs = Partial<
|
|||
indexName: string;
|
||||
};
|
||||
|
||||
export type PutConnectorNameAndDescriptionResponse = Partial<
|
||||
Pick<Connector, 'name' | 'description'>
|
||||
> & {
|
||||
export type PutConnectorNameAndDescriptionResponse = Pick<Connector, 'name' | 'description'> & {
|
||||
indexName: string;
|
||||
};
|
||||
|
||||
export const putConnectorNameAndDescription = async ({
|
||||
connectorId,
|
||||
description,
|
||||
description = null,
|
||||
indexName,
|
||||
name,
|
||||
name = '',
|
||||
}: PutConnectorNameAndDescriptionArgs) => {
|
||||
const route = `/internal/enterprise_search/connectors/${connectorId}/name_and_description`;
|
||||
|
||||
|
|
|
@ -65,7 +65,7 @@ export const ConnectorNameAndDescription: React.FC = () => {
|
|||
title: NAME_LABEL,
|
||||
},
|
||||
{
|
||||
description: description ?? '--',
|
||||
description: description || '--',
|
||||
title: DESCRIPTION_LABEL,
|
||||
},
|
||||
]}
|
||||
|
|
|
@ -254,8 +254,8 @@ export function registerConnectorRoutes({ router, log }: RouteDependencies) {
|
|||
connectorId: schema.string(),
|
||||
}),
|
||||
body: schema.object({
|
||||
name: schema.maybe(schema.string()),
|
||||
description: schema.maybe(schema.string()),
|
||||
name: schema.string(),
|
||||
description: schema.nullable(schema.string()),
|
||||
}),
|
||||
},
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue