samwaugh commited on
Commit
fd40d52
·
1 Parent(s): 6d3ee3c

Stub topics and creators

Browse files
Files changed (1) hide show
  1. backend/runner/app.py +12 -6
backend/runner/app.py CHANGED
@@ -356,17 +356,23 @@ def get_work(id: str):
356
 
357
  @app.route("/topics", methods=["GET"])
358
  def get_topics():
359
- """
360
- Return the list of topics.
361
- """
 
 
 
362
  return jsonify(topic_names)
363
 
364
 
365
  @app.route("/creators", methods=["GET"])
366
  def get_creators():
367
- """
368
- Return the list of creators.
369
- """
 
 
 
370
  return jsonify(creators)
371
 
372
 
 
356
 
357
  @app.route("/topics", methods=["GET"])
358
  def get_topics():
359
+ if STUB_MODE:
360
+ return jsonify({
361
+ "C52119013": "Art History",
362
+ "T13922": "Historical Art and Culture Studies",
363
+ "T12632": "Visual Culture and Art Theory"
364
+ })
365
  return jsonify(topic_names)
366
 
367
 
368
  @app.route("/creators", methods=["GET"])
369
  def get_creators():
370
+ if STUB_MODE:
371
+ return jsonify({
372
+ "arthur_hughes": ["W4206160935", "W2029124454"],
373
+ "francesco_hayez": ["W1982215463", "W4388661114"],
374
+ "george_stubbs": ["W2020798572", "W2021094421"]
375
+ })
376
  return jsonify(creators)
377
 
378