Git Product home page Git Product logo

chat_app's People

Contributors

3lackros3 avatar aravindgd avatar shivakumaarmgs avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

chat_app's Issues

POSTing in api/v1/meetings, params have String instead JSON or Hash.

With reference to issue at celeb4me repo Twilio request is sent as string cannot be sent has hash (#167)

Issue is now patched by converting the string back to JSON.
But the input is not entirely an string, its a hash and at each node string is stored.

The params we receive

Parameters: {"user"=>"{:uid_caller=>\"uni11\", :uid_receiver=>\"uni12\"}", "meeting"=>"{:duration=>\"10\", :start_at=>\"31-12-2014 5:00\"}", "caller"=>"{:name=>\"Tommy\", :number=>\"9876543210\", :call_type=>\"Browser\"}", "receiver"=>"{:name=>\"Kane\", :number=>\"9876543210\", :call_type=>\"Browser\"}"}

Here params[:meeting] gives {:duration=>"10", :start_at=>"31-12-2014 5:00"} but params[:meeting][:duration] gives TypeError - no implicit conversion of Symbol into Integer:. Likewise in params[:user], params[:caller]

So for now the patching is applied params[:user], params[:meeting], params[:caller], params[:receiver]

            def meeting_params
        eval(params[:meeting])
                #params.require(:meeting).permit(:order_id, :duration, :start_at)
            end

            def caller_params
        eval(params[:caller])
                #params.require(:caller).permit(:name, :number, :call_type)
            end

            def receiver_params
        eval(params[:receiver])
        #params.require(:receiver).permit( :name, :numberi, :call_type)
            end

            def user_params
        eval(params[:user])
                #params.require(:user).permit(:uid_receiver,:uid_caller)
            end

But further refactoring needed to eliminate the bug in regular way

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.