Skip to content

Issues with editing custom fields #543

Discussion options

You must be logged in to vote

I tried both "favorites" and "Favorites".

"favorites" is correct.

  1. Create a model "Favorites" without namespace.
2. Open up read/write permissions.
{
  "permissions": {
    "favorites": {
      "fields": [
        "display"
      ],
      "input": {
        "fields": [
          "display"
        ]
      }
    }
  }
}
  1. You can query and update data using swell-js as follows:
await swell.get('/favorites');
await swell.put(`/favorites/${id}`, { display: 'value' });

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by logeshswell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
2 participants