feat: daily horoscope by sign#151
Conversation
|
Great job on the JS part! You can research about |
Codecov Report
@@ Coverage Diff @@
## develop #151 +/- ##
===========================================
+ Coverage 99.21% 99.38% +0.16%
===========================================
Files 39 37 -2
Lines 1530 1457 -73
===========================================
- Hits 1518 1448 -70
+ Misses 12 9 -3
Continue to review full report at Codecov.
|
yammesicka
left a comment
There was a problem hiding this comment.
Great work! Please see my insights regarding the JS part :)
app/static/horoscope.js
Outdated
| xhr.send(); | ||
| } | ||
|
|
||
| var elements = document.getElementsByClassName('sign'); |
There was a problem hiding this comment.
Prefer using const and putting this inside the addEventLoop function
app/static/horoscope.js
Outdated
|
|
||
| var elements = document.getElementsByClassName('sign'); | ||
|
|
||
| function addEventsLoop() { |
There was a problem hiding this comment.
Prefer to name this function better
app/static/horoscope.js
Outdated
| @@ -0,0 +1,26 @@ | |||
| async function daily_horoscope(singName) { | |||
There was a problem hiding this comment.
Prefer to name this function better. Also, it doesn't have to be an async function
app/static/horoscope.js
Outdated
| xhr.onload = function() { | ||
| let obj = JSON.parse(this.responseText); | ||
| let daily = document.getElementById('daily_horoscope'); | ||
| let str = obj.description; |
|
Great job :) Please increase coverage in events.py and find better names for the JS variables :) |
https://forums.pythonic.guru/t/topic/8790