Skip to content

[BUG] Can't Delete customer contact #239

Description

@AyoobAli

Describe the bug
When trying to delete a customer contact you get an error message that the Method is not allowed.
The reason is, Deleting a contact require POST request, but a GET request in being sent.

To Reproduce
Steps to reproduce the behavior:

  1. Go to any customer profile
  2. Click on 'Add Contact'
  3. Provide contact name and click 'Save'
  4. Now click 'Edit' on the contact you just added
  5. Finally click 'Delete' to delete the contact

Expected behavior
The expected behavior is the customer contact gets deleted

Screenshots
Screenshot from 2023-05-05 21-08-31

Additional context
The issue is in the file:-

get_request_api('/manage/customers/' + customer_id + '/contacts/' + contact_id + '/delete')

The code is sending a GET request, and this has been deprecated.
It should be changed to the following:-

            post_request_api('/manage/customers/' + customer_id + '/contacts/' + contact_id + '/delete')

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions