Skip to content

Commit

Permalink
Fix: Request body should be inside 'dataSource' key when update a dat…
Browse files Browse the repository at this point in the history
…aSource resource

Signed-off-by: George J Padayatti <[email protected]>
  • Loading branch information
georgepadayatti committed Apr 7, 2024
1 parent ea6ccd8 commit c4e3c65
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/component/OrganisationDetails/OrgDetailsContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,15 @@ const OrganisationDetailsContainer = (props: Props) => {
const dispatch = useAppDispatch();
const [ formValue, setFormValue ] = useState(
{
'orgName': '',
'name': '',
'location': '',
'policyUrl': '',
'description': ''
})

useEffect(() => {
setFormValue({
'orgName': organisationDetails?.name,
'name': organisationDetails?.name,
'location': organisationDetails?.location,
'policyUrl': organisationDetails?.policyUrl,
'description': organisationDetails?.description
Expand Down Expand Up @@ -94,7 +94,9 @@ const handleChange = (e) => {

const handleSave = () => {
const obj = {
...formValue, "required": {}
"dataSource": {
...formValue
}
}
dispatch(updateDataSource(obj))
}
Expand Down Expand Up @@ -141,12 +143,12 @@ const addCredentialClass = isVerify ? 'view-credential' : !isEnableAddCredential
<Box sx={{ display: "flex", alignItems: 'center'}} mb={"11px"} mt={"-2px"}>
<TextField
autoFocus
value={formValue.orgName}
value={formValue.name}
onChange={(e) => handleChange(e)}
variant="standard"
placeholder={t("gettingStarted.organisationName")}
fullWidth
name='orgName'
name='name'
style={{
...editStyleEnable,
marginTop: "0.9px",
Expand Down

0 comments on commit c4e3c65

Please sign in to comment.