Webview: add form handling for create clan

This commit is contained in:
Johannes Kirschbauer
2024-06-11 19:20:28 +02:00
parent b0845c050c
commit 74538f69a9
7 changed files with 202 additions and 9 deletions

View File

@@ -33,7 +33,7 @@ class ClanMetaInfo:
@dataclass
class CreateOptions:
directory: Path
directory: Path | str
# Metadata for the clan
# Metadata can be shown with `clan show`
meta: ClanMetaInfo | None = None
@@ -43,7 +43,7 @@ class CreateOptions:
@API.register
def create_clan(options: CreateOptions) -> CreateClanResponse:
directory = options.directory
directory = Path(options.directory)
template_url = options.template_url
if not directory.exists():
directory.mkdir()