Fetch all preferences for caching.
()
| 166 | @blueprint.route("/get_all", methods=["GET"], endpoint='get_all') |
| 167 | @pga_login_required |
| 168 | def preferences_s(): |
| 169 | """Fetch all preferences for caching.""" |
| 170 | # Load Preferences |
| 171 | pref = Preferences.preferences() |
| 172 | res = [] |
| 173 | |
| 174 | for m in pref: |
| 175 | if len(m['categories']): |
| 176 | for c in m['categories']: |
| 177 | for p in c['preferences']: |
| 178 | p['module'] = m['name'] |
| 179 | res.append(p) |
| 180 | |
| 181 | return ajax_response( |
| 182 | response=res, |
| 183 | status=200 |
| 184 | ) |
| 185 | |
| 186 | |
| 187 | @blueprint.route("/get_all_cli", methods=["GET"], endpoint='get_all_cli') |
nothing calls this directly
no test coverage detected