json_api do
type "tasks"
routes do
base "/tasks"
get :read_by_task_id, route: "/:task_id"
index :read
post :create
patch :update_by_task_id, route: "/:task_id"
end
end
actions do
default_accept :*
defaults [:create, :read, :update, :destroy]
read :read_by_task_id do
get_by :task_id
end
read :read_by_rlhf_link do
get_by :task_rlhf_link
end
update :update_by_task_id do
<<< how to read it by task id first and then uodate? >>
end
end
json_api do
type "tasks"
routes do
base "/tasks"
get :read_by_task_id, route: "/:task_id"
index :read
post :create
patch :update_by_task_id, route: "/:task_id"
end
end
actions do
default_accept :*
defaults [:create, :read, :update, :destroy]
read :read_by_task_id do
get_by :task_id
end
read :read_by_rlhf_link do
get_by :task_rlhf_link
end
update :update_by_task_id do
<<< how to read it by task id first and then uodate? >>
end
end