boss Cntroller with before_ and different arity index behavior strangely

12 views
Skip to first unread message

Hao

unread,
Jan 21, 2016, 5:16:06 AM1/21/16
to chica...@googlegroups.com
The code under is OK. But once I removed the third parameter in the index('POST', [], Tok) and make it a function itself (index('POST', [])), Boss will error out: [error] Error in controller error:function_clause 

-module(hillwave_quotes_controller, [Req, SessionId]).
-compile(export_all).
before_(_,_,_) ->
  {ok, "token"}.
index('POST', [], Tok) ->
  {json, []};
index('GET', [], Tok) ->
  ?DEBUG("~p", Tok),

Hao

Graeme Defty

unread,
Jan 21, 2016, 5:49:53 AM1/21/16
to chica...@googlegroups.com
Hi,

What is the URL you are using to trigger the controller?



--
You received this message because you are subscribed to the Google Groups "ChicagoBoss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chicagoboss...@googlegroups.com.
Visit this group at https://groups.google.com/group/chicagoboss.
To view this discussion on the web visit https://groups.google.com/d/msgid/chicagoboss/731a82d1.fc8f.152634870df.Coremail.jusfeel%40163.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages