ash json api - update by other field
Here is what I want to do
1. read the task by task_id and update the params received in the json api for that task.
4 Replies
https://hexdocs.pm/ash_json_api/dsl-ashjsonapi-domain.html#json_api-routes-patch-read_action
Use a different read action
and then configure the route to have
task_id
in itHere is the updated config, but that does not work, I am missing something.
Its different for AshJsonApi and the way you're calling it
YOu don't need the argument on the update action
AshJsonApi
does
If you want a code interface that does that, you can just have the update action, and do define :update_by_task_id, get_by: [:task_id]
IIRC:thinkies: this is new to me!
perfect this work!
Thanks!