我想在我的rails用戶模型中添加一個新的更新(new_update)動作,它將更新模型中的單個列。其中休息API方法我應該使用路線文件。我應該使用投入或補丁或兩者兼而有之。 resources: users do
member do
put 'new_update'
patch 'new_update'
end
我試圖接受一個圖像文件已經發布使用我的基於POST API的Django REST函數。這是基於https://github.com/m-haziq/django-rest-swagger-docs 我收到此錯誤截圖(https://imgur.com/a/ECq5y) Object of type 'TypeError' is not JSON serializable
這樣做 face_i