Improve Randomness of random verse selection not dependent on system clock.
This commit is contained in:
@@ -56,14 +56,14 @@ def test():
|
||||
# json
|
||||
@app.get("/random")
|
||||
def random_verse_json():
|
||||
scripture = random.choice(kjv)['field']
|
||||
scripture = random.SystemRandom().choice(kjv)['field']
|
||||
|
||||
return(respond_json(scripture))
|
||||
|
||||
# plain
|
||||
@app.get("/t/random")
|
||||
def random_verse_plain():
|
||||
scripture = random.choice(kjv)['field']
|
||||
scripture = random.SystemRandom().choice(kjv)['field']
|
||||
|
||||
return(respond_text(scripture))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user