Skip to content

Req:deep_post_params() raise Error. #47

Description

@dcy
Module: xyadmin_email_controller, Line: 22, 
My print's "Req : post_params ( )" is [{"title","dsfasdfasdf"},
                                       {"serverlists[]","2"},
                                       {"users",[]},
                                       {"content","asdfasdfasdf"},
                                       {"attachments[0][item_type]","1"},
                                       {"attachments[0][item_id]","1"},
                                       {"attachments[0][item_name]","1"},
                                       {"attachments[0][item_amount]","1"},
                                       {"attachments[1][item_type]","2"},
                                       {"attachments[1][item_id]","1"},
                                       {"attachments[1][item_name]","1"},
                                       {"attachments[1][item_amount]","1"}]

How can i get the "attachments"?
I tried Req:param_group("attachments[]"), Req:post_param("attachments"), Req:post_param_group("attachments[]")

Req:deep_post_params() and Req:deep_post_param("attachments") will raise Error:
[error] Error in controller error:{case_clause,nomatch} Stacktrace: [{simple_bridge_request_wrapper,parse_deep_post_params,3,[{file,"src/simple_bridge_request_wrapper.erl"},{line,148}]},{xyadmin_email_controller,send,4,[{file,"/home/dcy/xyadmin/src/controller/xyadmin_email_controller.erl"},{line,30}]},{boss_web_controller,call_controller_action,3,[{file,"src/boss/boss_web_controller.erl"},{line,316}]},{boss_web_controller,apply_action,4,[{file,"src/boss/boss_web_controller.erl"},{line,308}]},{boss_web_controller,execute_action_inner,9,[{file,"src/boss/boss_web_controller.erl"},{line,287}]},{boss_web_controller_handle_request,process_dynamic_request,5,[{file,"src/boss/boss_web_controller_handle_request.erl"},{line,254}]},{boss_web_controller_handle_request,process_request,5,[{file,"src/boss/boss_web_controller_handle_request.erl"},{line,240}]},{boss_web_controller_handle_request,set_timer,8,[{file,"src/boss/boss_web_controller_handle_request.erl"},{line,160}]}]

It also at ChicagoBoss/ChicagoBoss#576

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions