Open Altai-man opened 5 years ago
I have working code for classified
example and Cro::HTTP::Session::Red
, what should I do next?
A PR will do?
I’m still trying to fix that with user defined sessions... can I take a look at your code? Thanks!
Here is Routes.pm6: https://gist.github.com/Altai-man/f949c8ae1ef8ff0c1d513e163e192d38
About user defined sessions...
I think, the approach here is to offer a role with those fields(id, uid, session-id) and make an obligation for user to implement it. This way something like this is possible:
class CustomSession does Cro::HTTP::Session::Red::Session {
has @.history is referencing ...
....
}
And, I hope, Red will handle mixed in attributes just fine.
Here are some tests. :)
@FCO hi! It seems the issues were resolved, right? Can this ticket be closed?
I was trying to test it yesterday, but found a bug on .create-table: :if-not-exists
while testing... now it’s fixed, I’ll try to test it again as soon as possible.
I have no better title for this ticket, please fix if any better ones.
So there are these particular issues with this app:
1)User session model has to be
For login post route here is a diff:
As for Session::Red module, here is a working gist - https://gist.github.com/Altai-man/546d99c3cbe4dfcd15b4ee9efa1f9ac4 with explanations added.
I was able to make it keep a session, but I am unable to update it: the next issue to look into here is that with those changes I have:
for
$session.uid = $user.id
in login post route, which I don't have an idea how to fix.