File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -12,14 +12,14 @@ import { useGet } from '../../common/crud/useGet';
12
12
import { usePatchRequest } from '../../common/crud/usePatchRequest' ;
13
13
import { usePostRequest } from '../../common/crud/usePostRequest' ;
14
14
import { HubNamespace } from './HubNamespace' ;
15
- import { hubAPI } from '../api' ;
15
+ import { hubAPI , pulpAPI } from '../api' ;
16
16
17
17
export function CreateHubNamespace ( ) {
18
18
const { t } = useTranslation ( ) ;
19
19
const navigate = useNavigate ( ) ;
20
20
const postRequest = usePostRequest < HubNamespace > ( ) ;
21
21
const onSubmit : PageFormSubmitHandler < HubNamespace > = async ( namespace ) => {
22
- const createdNamespace = await postRequest ( hubAPI `/_ui/v1 /namespaces/`, namespace ) ;
22
+ const createdNamespace = await postRequest ( pulpAPI `/pulp_ansible /namespaces/`, namespace ) ;
23
23
navigate ( RouteObj . NamespaceDetails . replace ( ':id' , createdNamespace . name . toString ( ) ) ) ;
24
24
} ;
25
25
return (
@@ -35,7 +35,9 @@ export function CreateHubNamespace() {
35
35
submitText = { t ( 'Create namespace' ) }
36
36
onSubmit = { onSubmit }
37
37
onCancel = { ( ) => navigate ( - 1 ) }
38
- defaultValue = { { groups : [ ] } }
38
+ defaultValue = { {
39
+ latest_metadata : { groups : [ ] } ,
40
+ } }
39
41
>
40
42
< HubNamespaceInputs />
41
43
</ PageForm >
You can’t perform that action at this time.
0 commit comments