Update admin configuration
(self, **kwargs)
| 1345 | return None |
| 1346 | |
| 1347 | async def update_admin_config(self, **kwargs): |
| 1348 | """Update admin configuration""" |
| 1349 | async with self._connect(write=True) as db: |
| 1350 | updates = [] |
| 1351 | params = [] |
| 1352 | |
| 1353 | for key, value in kwargs.items(): |
| 1354 | if value is not None: |
| 1355 | updates.append(f"{key} = ?") |
| 1356 | params.append(value) |
| 1357 | |
| 1358 | if updates: |
| 1359 | updates.append("updated_at = CURRENT_TIMESTAMP") |
| 1360 | query = f"UPDATE admin_config SET {', '.join(updates)} WHERE id = 1" |
| 1361 | await db.execute(query, params) |
| 1362 | await db.commit() |
| 1363 | |
| 1364 | async def get_proxy_config(self) -> Optional[ProxyConfig]: |
| 1365 | """Get proxy configuration""" |
no test coverage detected