We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
While following example code in the authentication docs
It appears that it is attempting to run the following sql
insert into account (password, db/table, email) values (?, ?, ?);
With the params being set to.
@{:db/table @{:keys (:email :password) :required true} :email "example@example.com" :password "....."}
I've tracked this down in the code.. it seems that params will accept input without a table
params
(def params (params # nothing here (validates [:email :password] :required true) (permit [:email :password])))
while later in the request
(params ?) (hash-password ?) (db/insert :account ?)
The correct way of doing things seems to be
(def params (params :account (validates [:email :password] :required true) (permit [:email :password])))
(params ?) (hash-password ?) (db/insert ?) # No longer include the table name
It was really confusing to get an error like invalid syntax around /, which required hacking in printf's to find the cause.
/
The text was updated successfully, but these errors were encountered:
Ah yes, this should definitely throw an error from params, and the docs should be clearer.
Seems like you’re the first one to use joy pretty extensively haha
Sorry, something went wrong.
Seeing https://news.ycombinator.com/item?id=23046568 On HN is what brought me to Janet.
I just could never write the application I wanted to until I had cryptography primitives.
I've put up an example project that incorporates the authentication doc material.
There are syntactic problems too that have been resolved in this https://github.com/LeviSchuck/joy-example-auth
I updated the authentication docs for now, but I think I need a whole new docs section on params and what it does
No branches or pull requests
While following example code in the authentication docs
It appears that it is attempting to run the following sql
With the params being set to.
I've tracked this down in the code.. it seems that
params
will accept input without a tablewhile later in the request
The correct way of doing things seems to be
It was really confusing to get an error like invalid syntax around
/
, which required hacking in printf's to find the cause.The text was updated successfully, but these errors were encountered: