-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
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
Code review #75
Code review #75
Conversation
Codecov Report
@@ Coverage Diff @@
## master #75 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 8 8
Lines 210 207 -3
=========================================
- Hits 210 207 -3
Continue to review full report at Codecov.
|
test/auth/apikey_test.exs
Outdated
|
||
keys = Auth.Apikey.list_apikeys_for_person(person.id) | ||
assert length(keys) == 3 | ||
end | ||
|
||
# | ||
# alias Auth.Ctx |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can probably just delete this. 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@SimonLab these updates make sense.
When ready, please assign. 👍
givenName: profile.name, | ||
picture: profile.avatar_url, | ||
auth_provider: "github" | ||
}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
person # |> IO.inspect(label: "updated person:230") | ||
{:ok, person} = | ||
changeset(%Person{id: ep.id}, merged) | ||
# |> IO.inspect(label: "changeset transformed:234") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm happy for all IO.inspect
to be removed.
Looking forward to adding more advanced Logging dwyl/app#274 👍
conn # email invalid, re-render the login/register form: | ||
|> index(params) | ||
# email invalid, re-render the login/register form: | ||
index(conn, params) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
makes sense. dunno why I left this redundant pipe in.
It has another function before invoking index
.
Thanks for tidying.
|
||
end | ||
# setup password form depending on person values | ||
defp password_form(conn, person, state) do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is a good split out. thanks. 👍
# |> IO.inspect(label: "int") | ||
|
||
assert decrypted == person_id | ||
end | ||
|
||
test "decode_decrypt/1 reverses the operation of encrypt_encode/1" do | ||
person_id = 4869234521 | ||
person_id = 4_869_234_521 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
did dialyxir
update the format of these numbers?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might have been mix format
maybe
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool. Good to know they both work. 👍
person_id
should be an unsigned int without the underscores because it's defined by PostgreSQL which does not use underscores in integers.
I will update the code in the future to reflect this. 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@SimonLab thanks for making these improvements. 👍
ref: #74