pkoerner / expert-parakeet

1 stars 0 forks source link

Error when trying to add new correction #152

Closed iTitus closed 4 months ago

iTitus commented 4 months ago

Now that #130 is merged the (get-in req [:session :user :id]) call would get "our" user id, but the git id is still available via (get-in req [:session :user :oauth-github-id]). Alternatively you could use the get-user-by-id db function instead of get-user-by-git-id

_Originally posted by @JanKneiphof in https://github.com/pkoerner/expert-parakeet/pull/133#discussion_r1292718223_

iTitus commented 4 months ago

image

iTitus commented 4 months ago

This needs to be changed so it uses the get-user-by-id function and not get-user-by-github-id

dpkass commented 4 months ago

How did you get to that view?

iTitus commented 4 months ago
  1. I commented out the validity check in question_controller.clj:22 image

  2. Then I manually browsed to /question/1 and answered the question. image

  3. Look for the log statement that tells us the :answer/id. image

  4. Browse to /new-correction?answer-id=<answer id>, write some feedback and submit image (you have to put the points to 1 on this question for some reason, I think that's another bug)

  5. Success (?) image

dpkass commented 4 months ago

Thanks. I found a simpler way: http://localhost:8081/new-correction?answer-id=1

iTitus commented 4 months ago

Ah nice, some answers are in the dummy data :+1: