(self, to, address)
| 1013 | |
| 1014 | @flag.admin |
| 1015 | def actionSiteAdd(self, to, address): |
| 1016 | site_manager = SiteManager.site_manager |
| 1017 | if address in site_manager.sites: |
| 1018 | return {"error": "Site already added"} |
| 1019 | else: |
| 1020 | if site_manager.need(address): |
| 1021 | return "ok" |
| 1022 | else: |
| 1023 | return {"error": "Invalid address"} |
| 1024 | |
| 1025 | @flag.admin |
| 1026 | @flag.async_run |