|  | 
| 18 | 18 | @click.argument("answer") | 
| 19 | 19 | @click.argument("rank") | 
| 20 | 20 | @click.argument("asset") | 
| 21 |  | -def q_add(title, answer, rank, asset): | 
|  | 21 | +@click.argument("hint1") | 
|  | 22 | +@click.argument("hint2") | 
|  | 23 | +def q_add(title, answer, rank, asset, hint1, hint2): | 
| 22 | 24 |  """Add a new question to the database | 
| 23 | 25 | 
 | 
| 24 | 26 |  TITLE is the text for the title of the question | 
| 25 | 27 |  ANSWER is the answer stored only in the database | 
| 26 | 28 |  RANK is the day rank the queestion should be revealed on | 
| 27 | 29 |  ASSET is a path to a file to upload for a question | 
|  | 30 | + HINT1 is a hint string  | 
|  | 31 | + HINT2 is a hint string | 
| 28 | 32 |  """ | 
| 29 | 33 | 
 | 
| 30 | 34 |  asset = os.path.abspath(asset) | 
| 31 |  | - qid = add_question(title, answer, rank, asset) | 
|  | 35 | + qid = add_question(title, answer, rank, asset, hint1, hint2) | 
| 32 | 36 | 
 | 
| 33 | 37 |  click.echo(f"added question id {qid}") | 
| 34 | 38 | 
 | 
| @@ -66,7 +70,9 @@ def q_del(qid): | 
| 66 | 70 | @click.argument("answer") | 
| 67 | 71 | @click.argument("rank") | 
| 68 | 72 | @click.argument("asset") | 
| 69 |  | -def q_replace(title, answer, rank, asset): | 
|  | 73 | +@click.argument("hint1") | 
|  | 74 | +@click.argument("hint2") | 
|  | 75 | +def q_replace(title, answer, rank, asset, hint1, hint2): | 
| 70 | 76 |  """Replace an existing rank's question. | 
| 71 | 77 | 
 | 
| 72 | 78 |  This basically deletes the previous rank then adds the new rank | 
|  | 
0 commit comments