flask-restless
flask-restless copied to clipboard
It's better to throw exception when apply function to a unsupported preprocessor type
"PUT_SINGLE" is a preprocessor type, bug "PUT" is not a a preprocessor type. If flask-restless throw exception when using "PUT", users will quickly know why their pre_put() not be excuted.
api_manager.create_api(Persion, methods=['GET', 'POST', 'PUT'],
preprocessors={
'PUT': [pre_put],
})
(Note that in the latest version, this becomes PATCH_RESOURCE
.)
This is probably a good, user-friendly idea.