These are chat archives for wheres-my-receipt/give_me_your_money

31st
Mar 2015
James Griffiths
@MIJOTHY
Mar 31 2015 08:26
also will have to think about where handlers etc should be located, as it would be strange to require the server module in the controller just for injection purposes, maybe there's an easier way
Sarah Johnston
@sarahabimay
Mar 31 2015 09:37
Mmm good point. Will think and see if there are suggestions. Also, I started to implement a new route for admin updates and no matter what, this type of route is going to pass payload and therefore seems very much like an api route whether you call it's handler a view or not. I guess this is an unavoidable server stack call. As such, there's no point in calling a 'view' handler and then a server inject, it may as well use an api route straight away.
Sarah Johnston
@sarahabimay
Mar 31 2015 13:10
I couldn't get the inject to work.. I'll comment out what I tried so you can see, but I tried something else which also avoids an unnecessary network call. I basically registered the updateAccount handler as a server.method which can then be utilized anywhere in controllers or even in routes I suppose..
Sarah Johnston
@sarahabimay
Mar 31 2015 16:54
just noticed that redirect to /account in updateAccount handler isn't working, which means the alerts aren't being displayed.. is that on account of the ajax callback: window.location.reload(true) do you think?
James Griffiths
@MIJOTHY
Mar 31 2015 22:16
yeah i was trying that out before, not entirely sure but perhaps