Skip to content

Single post location for _embed update? #154

Closed
@wguldin

Description

@wguldin

Hi everyone!

json-server is a great tool so far. I'm just having trouble updating some information. I'm pulling in data using the _embed feature, which works great.

The url I'm using for these requests is http://localhost:3000/contacts/:id/?_embed=tags

Which returns data like this:

{
  "id": "13ca5c4e-e129-4ce1-afbf-d6e0cfb6fc5d",
  "firstname": "James",
  "lastname": "Testerson Smith",
  "tags": [
    {
      "id": "70672388-7864-452a-ba7f-da319fe67913",
      "contactId": "13ca5c4e-e129-4ce1-afbf-d6e0cfb6fc5d",
      "tagLabel": "Tag 1"
    }
  ],

But, I then edit some of this information, including the first name and a tag associated with this person. Is there a single URL I can post to that will process the information?

Right now I'm doing separate ajax calls to update the data, but that feels wrong.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions