Skip to content

DeletedEntry should also have a getContentType() method #101

@Jalle19

Description

@Jalle19

Currently DeletedEntry payloads look like this:

{
  "sys": {
    "type": "DeletedEntry",
    "id": "someid",
    "space": {
      "sys": {
        "type": "Link",
        "linkType": "Space",
        "id": "somespace"
      }
    },
    "revision": 3,
    "createdAt": "2017-05-03T13:19:33.711Z",
    "updatedAt": "2017-05-03T13:19:33.711Z",
    "deletedAt": "2017-05-03T13:19:33.711Z",
    "contentType": {
      "sys": {
        "type": "Link",
        "linkType": "ContentType",
        "id": "theme"
      }
    }
  }
}

Yet the DeletedEntry class doesn't have the getContentType() method that e.g. DynamicEntry has. This makes it impossible to determine what type of thing was deleted, you have to parse the raw payload yourself to extract the data.

Are you accepting pull requests? There doesn't seem to be much activity here so I'm reluctant to post a solution myself, but if you acknowledge this then I will.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions