feat: topics 헬퍼 (get_topics, update_topics)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
11
app.py
11
app.py
@@ -134,6 +134,17 @@ def can_accept_votes(data):
|
||||
return s.get("current_stage") == "vote" and s.get("voting_open", False)
|
||||
|
||||
|
||||
def get_topics():
|
||||
return load_data().get("topics", {}).get("categories", [])
|
||||
|
||||
|
||||
def update_topics(categories):
|
||||
def _fn(data):
|
||||
data.setdefault("topics", {})
|
||||
data["topics"]["categories"] = categories
|
||||
update_data(_fn)
|
||||
|
||||
|
||||
def get_tie_breaks():
|
||||
return load_data().get("tie_breaks", {})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user