uvdesk / api-bundle

API Integration for UVdesk Community Helpdesk System.
MIT License
17 stars 14 forks source link

When we using the raw format for create agent api then here showing an error #53

Open komal-sh-27 opened 1 year ago

komal-sh-27 commented 1 year ago

Description
When we using the raw format for create agent api then here showing an error

How to reproduce
Step 1: Added a details for creating agent in raw option like this:

{
    "firstName": "lazer",
    "lastName": "angelov",
    "role": "ROLE_AGENT",
    "email": "lazersampleagent2570@gmail.com",
    "contactNumber": "8178563000",
    "isActive": "false",
    "signature": "lazer angelov",
    "designation": "QA",
    "agentPrivilege": ["2"],
    "userSubGroup": ["3"],
    "groups": ["2"],
    "ticketView": "2"
}

Step 2: Then send api and here showing an error like this: "Notice: Undefined index: email"

Screenshot from 2023-06-05 17-48-53

Note: Same params we have using with the data form then agent created successfully.

Possible Solution
If we have added data with raw format so here should be create an agent from postman api side.

komal-sh-27 commented 1 year ago

I have checked this issue and this issue has been resolved now after changed the agent.php file from here: https://github.com/uvdesk/api-bundle/blob/842d8e6602c5175921bf6e309314ee9ac0d90276/API/Agents.php

Now using the raw format also working with agent create api