pucardotorg / dristi

MIT License
2 stars 12 forks source link

API compliance || Able to update the case without the filingNumber. #758

Closed mustakim-egov closed 1 month ago

mustakim-egov commented 2 months ago

Describe the bug Able to update the case without filingNumber and also after getting updated in response by default filingNumber is null

To Reproduce curl --location 'https://dristi-dev.pucar.org/case/case/v1/_update?tenantId=pg&_=1720007345950' \ --header 'accept: application/json, text/plain, /' \ --header 'accept-language: en-US,en;q=0.9' \ --header 'content-type: application/json;charset=UTF-8' \ --header 'origin: https://dristi-dev.pucar.org' \ --header 'priority: u=1, i' \ --header 'referer: https://dristi-dev.pucar.org/digit-ui/citizen/dristi/home/file-case/case?caseId=86876484-f75c-4739-8d2e-b5702740b6c0&selected=addSignature' \ --header 'sec-ch-ua: "Not/A)Brand";v="8", "Chromium";v="126", "Google Chrome";v="126"' \ --header 'sec-ch-ua-mobile: ?0' \ --header 'sec-ch-ua-platform: "Windows"' \ --header 'sec-fetch-dest: empty' \ --header 'sec-fetch-mode: cors' \ --header 'sec-fetch-site: same-origin' \ --header 'user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36' \ --data '{ "cases": { "id": "f55e83f0-fb4b-47ef-973a-47e74f6ea6fc", "tenantId": "pg", "resolutionMechanism": "COURT", "caseTitle": "Vijay Hugar VS Qanew Qanewl", "isActive": true, "caseDescription": "Case description",

        "courtCaseNumber": null,
        "caseNumber": null,
        "cnrNumber": null,
        "accessCode": null,
        "courtId": null,
        "benchId": null,
        "linkedCases": null,
        "filingDate": "03-08-2024",
        "registrationDate": null,
        "judgementDate": null,
        "caseDetails": {
            "chequeDetails": {
                "formdata": [
                    {
                        "data": {
                            "ifsc": "HDFC0000053",
                            "name": "Order Cheque",
                            "bankName": "Hdfc",
                            "depositDate": "2024-03-08",
                            "infoBoxData": {
                                "data": [
                                    "CS_SIX_MONTH_BEFORE_DEPOSIT_TEXT",
                                    "CS_CHEQUE_RETURNED_INSUFFICIENT_FUND"
                                ],
                                "header": "CS_COMMON_NOTE"
                            },
                            "chequeAmount": "1000000",
                            "chequeNumber": "654321",
                            "issuanceDate": "2024-03-01",
                            "chequeSignatoryName": "Musatkim Qa",
                            "returnMemoFileUpload": {
                                "document": [
                                    {
                                        "fileName": "CS_CHEQUE_RETURN_MEMO",
                                        "fileStore": "857abcdc-f0b1-42a6-8c3d-850fecc9b711",
                                        "documentName": "AI learning road map.jpg",
                                        "documentType": "image/jpeg"
                                    }
                                ]
                            },
                            "bouncedChequeFileUpload": {
                                "document": [
                                    {
                                        "fileName": "CS_BOUNCED_CHEQUE",
                                        "fileStore": "deb6c717-ef6e-44c1-a747-449b3c9967fd",
                                        "documentName": "PIC284.jpg",
                                        "documentType": "image/jpeg"
                                    }
                                ]
                            },
                            "depositChequeFileUpload": {
                                "document": [
                                    {
                                        "fileName": "CS_PROOF_DEPOSIT_CHEQUE",
                                        "fileStore": "35287901-21cd-413d-b534-e695c30a2bb8",
                                        "documentName": "AI learning road map.jpg",
                                        "documentType": "image/jpeg"
                                    }
                                ]
                            }
                        },
                        "isenabled": true,
                        "displayindex": 0
                    }
                ],
                "isCompleted": true
            },
            "delayApplications": {
                "formdata": [
                    {
                        "data": {
                            "delayCondonationType": {
                                "code": "YES",
                                "name": "YES",
                                "showForm": false,
                                "isEnabled": true
                            },
                            "condonationFileUpload": {}
                        },
                        "isenabled": true,
                        "displayindex": 0
                    }
                ],
                "isCompleted": true
            },
            "demandNoticeDetails": {
                "formdata": [
                    {
                        "data": {
                            "proofOfReply": {
                                "code": "NO",
                                "name": "NO",
                                "isEnabled": true,
                                "isVerified": true,
                                "showProofOfReply": false,
                                "hasBarRegistrationNo": true
                            },
                            "dateOfAccrual": "2024-06-18",
                            "dateOfService": "2024-06-03",
                            "dateOfDispatch": "2024-06-01",
                            "dateOfIssuance": "2024-05-01",
                            "proofOfService": {
                                "code": "NO",
                                "name": "NO",
                                "isEnabled": true,
                                "isVerified": true,
                                "hasBarRegistrationNo": true,
                                "showProofOfAcknowledgment": false
                            },
                            "modeOfDispatchType": {
                                "modeOfDispatchType": {
                                    "code": "POST",
                                    "name": "POST",
                                    "isEnabled": true,
                                    "commonFields": true
                                }
                            },
                            "delayApplicationType": {
                                "code": "YES",
                                "name": "YES",
                                "showForm": false,
                                "isEnabled": true
                            },
                            "proofOfReplyFileUpload": {},
                            "proofOfDispatchFileUpload": {
                                "document": [
                                    {
                                        "fileName": "PROOF_OF_DISPATCH_FILE_NAME",
                                        "fileStore": "d1dacff3-4ad7-4a64-bcbd-b19094624edd",
                                        "documentName": "AI learning road map.jpg",
                                        "documentType": "image/jpeg"
                                    }
                                ]
                            },
                            "legalDemandNoticeFileUpload": {
                                "document": [
                                    {
                                        "fileName": "LEGAL_DEMAND_NOTICE",
                                        "fileStore": "7c1b4579-a489-47f6-9f3d-3ee844faa3ed",
                                        "documentName": "AI learning road map.jpg",
                                        "documentType": "image/jpeg"
                                    }
                                ]
                            },
                            "proofOfAcknowledgmentFileUpload": {}
                        },
                        "isenabled": true,
                        "displayindex": 0
                    }
                ],
                "isCompleted": true
            },
            "debtLiabilityDetails": {
                "formdata": [
                    {
                        "data": {
                            "liabilityType": {
                                "code": "FULL_LIABILITY",
                                "name": "Full Liability",
                                "isEnabled": true,
                                "showAmountCovered": false
                            },
                            "liabilityNature": {
                                "code": "LOAN",
                                "name": "Loan",
                                "isEnabled": true,
                                "showAmountCovered": false
                            },
                            "debtLiabilityFileUpload": {
                                "document": [
                                    {
                                        "fileName": "CS_PROOF_DEBT",
                                        "fileStore": "2b922949-fb78-4be6-9ad0-06daf8e493e1",
                                        "documentName": "AI learning road map.jpg",
                                        "documentType": "image/jpeg"
                                    }
                                ]
                            }
                        },
                        "isenabled": true,
                        "displayindex": 0
                    }
                ],
                "isCompleted": true
            }
        },
        "caseCategory": "CIVIL",
        "judgeId": null,
        "stage": null,
        "substage": null,
        "natureOfPleading": null,
        "statutesAndSections": [
            {
                "id": "94e4d1ef-d581-4243-b4e8-49cb6fe20a83",
                "tenantId": "pg",
                "statute": "Statute",
                "sections": [],
                "subsections": [],
                "additionalDetails": null,
                "auditdetails": {
                    "createdBy": "c869bf7f-ce1d-4f0c-a552-929ec75fbd6d",
                    "lastModifiedBy": "c869bf7f-ce1d-4f0c-a552-929ec75fbd6d",
                    "createdTime": 1720089664414,
                    "lastModifiedTime": 1720089664414
                },
                "strSections": null,
                "strSubsections": null
            }
        ],
        "litigants": [
            {
                "id": "b58218fa-2a3c-411e-ad27-516d7e2d3358",
                "tenantId": "pg",
                "caseId": "86876484-f75c-4739-8d2e-b5702740b6c0",
                "partyCategory": null,
                "organisationID": null,
                "individualId": "IND-2024-06-24-001621",
                "partyType": "complainant.primary",
                "isActive": false,
                "documents": null,
                "auditDetails": {
                    "createdBy": "c869bf7f-ce1d-4f0c-a552-929ec75fbd6d",
                    "lastModifiedBy": "c869bf7f-ce1d-4f0c-a552-929ec75fbd6d",
                    "createdTime": 1720089664414,
                    "lastModifiedTime": 1720089664414
                },
                "additionalDetails": null
            }
        ],
        "representatives": [
            {
                "id": "83451df5-e23b-4a1e-adf6-99908e3c3bcb",
                "tenantId": "pg",
                "advocateId": "9281065f-253f-435f-bdb7-acaa2048b90c",
                "caseId": null,
                "representing": [
                    {
                        "id": "237ca912-ab02-4170-b98d-bf5e0af97fa8",
                        "tenantId": "pg",
                        "caseId": "86876484-f75c-4739-8d2e-b5702740b6c0",
                        "partyCategory": "INDIVIDUAL",
                        "organisationID": null,
                        "individualId": "IND-2024-06-24-001621",
                        "partyType": "complainant.primary",
                        "isActive": false,
                        "documents": null,
                        "auditDetails": {
                            "createdBy": "c869bf7f-ce1d-4f0c-a552-929ec75fbd6d",
                            "lastModifiedBy": "c869bf7f-ce1d-4f0c-a552-929ec75fbd6d",
                            "createdTime": 1720089664414,
                            "lastModifiedTime": 1720089664414
                        },
                        "additionalDetails": null
                    }
                ],
                "isActive": false,
                "documents": null,
                "auditDetails": {
                    "createdBy": "c869bf7f-ce1d-4f0c-a552-929ec75fbd6d",
                    "lastModifiedBy": "c869bf7f-ce1d-4f0c-a552-929ec75fbd6d",
                    "createdTime": 1720089664414,
                    "lastModifiedTime": 1720089664414
                },
                "additionalDetails": null
            }
        ],
        "status": "DRAFT_IN_PROGRESS",
        "documents": null,
        "remarks": null,
        "workflow": {
            "action": "SAVE_DRAFT",
            "comments": null,
            "documents": null,
            "assignes": null,
            "rating": null
        },
        "additionalDetails": null,
        "auditDetails": {
            "createdBy": "c869bf7f-ce1d-4f0c-a552-929ec75fbd6d",
            "lastModifiedBy": "c869bf7f-ce1d-4f0c-a552-929ec75fbd6d",
            "createdTime": 1720089664414,
            "lastModifiedTime": 1720089664414
        }
    },
"tenantId": "pg",
"RequestInfo": {
    "apiId": "Rainmaker",
    "authToken": "a654f791-b85e-447d-992d-8668722ec9c8",
    "userInfo": {
        "id": 2346,
        "uuid": "c869bf7f-ce1d-4f0c-a552-929ec75fbd6d",
        "userName": "6677889999",
        "name": "Vijay Hugar",
        "mobileNumber": "6677889999",
        "emailId": null,
        "locale": null,
        "type": "CITIZEN",
        "roles": [
            {
                "name": "CASE_EDITOR",
                "code": "CASE_EDITOR",
                "tenantId": "pg"
            },
            {
                "name": "DEPOSITION_EDITOR",
                "code": "DEPOSITION_EDITOR",
                "tenantId": "pg"
            },
            {
                "name": "DEPOSITION_VIEWER",
                "code": "DEPOSITION_VIEWER",
                "tenantId": "pg"
            },
            {
                "name": "CASE_CREATOR",
                "code": "CASE_CREATOR",
                "tenantId": "pg"
            },
            {
                "name": "CASE_VIEWER",
                "code": "CASE_VIEWER",
                "tenantId": "pg"
            },
            {
                "name": "Citizen",
                "code": "CITIZEN",
                "tenantId": "pg"
            },
            {
                "name": "DEPOSITION_CREATOR",
                "code": "DEPOSITION_CREATOR",
                "tenantId": "pg"
            },
            {
                "name": "ADVOCATE_ROLE",
                "code": "ADVOCATE_ROLE",
                "tenantId": "pg"
            }
        ],
        "active": true,
        "tenantId": "pg",
        "permanentCity": null
    },
    "msgId": "1720007345950|en_IN",
    "plainAccessRequest": {}
}

}'

nileshgupta111 commented 1 month ago

@mustakim-egov since you are sending case id it is able to update

manimaarans commented 1 month ago

we are not allowing users to override system-generated fields