增加课表管理员密钥导出
This commit is contained in:
+4
-1
@@ -698,7 +698,10 @@ def timetable_collectors():
|
||||
emails = values.split(',') if values is not None else cfg('timetable', 'collector_emails', [])
|
||||
return {email.strip().lower() for email in emails if email.strip()}
|
||||
|
||||
timetable_routes.install(app, get_db, current_user, lambda: _db_path.parent / 'timetables', timetable_collectors)
|
||||
def timetable_admin_key():
|
||||
return os.getenv('WORKLOG_TIMETABLE_ADMIN_KEY', str(cfg('timetable', 'admin_export_key', '')))
|
||||
|
||||
timetable_routes.install(app, get_db, current_user, lambda: _db_path.parent / 'timetables', timetable_collectors, timetable_admin_key)
|
||||
|
||||
|
||||
@app.exception_handler(IntegrityError)
|
||||
|
||||
Reference in New Issue
Block a user