slash v2.0.0-rc.5 Slash.Utils View Source

Utility functions for usage in Slash.Builder plugs.

Link to this section Summary

Functions

Handle a response from a command block

Sends a json response to the conn

Link to this section Functions

Link to this function

build_response_payload(response) View Source
build_response_payload(Slash.Builder.command_response()) :: map()

Handle a response from a command block.

Link to this function

send_json(conn, response, status \\ 200) View Source
send_json(Plug.Conn.t(), map(), number()) :: Plug.Conn.t()

Sends a json response to the conn.