ki-backend/ki/commands.py

25 lines
497 B
Python
Raw Permalink Normal View History

2021-07-05 19:37:05 +02:00
# SPDX-FileCopyrightText: WTF Kooperative eG <https://wtf-eg.de/>
#
# SPDX-License-Identifier: AGPL-3.0-or-later
2021-06-26 10:51:39 +02:00
import click
2021-06-26 10:51:39 +02:00
from app import app
from ki.actions import seed
from ki.actions import delete_profile
2021-06-13 21:41:01 +02:00
@app.cli.command("seed")
2021-06-26 10:51:39 +02:00
@click.option("--dev", is_flag=True)
def seed_command(dev):
seed(dev)
@app.cli.command("delete", help="Delete a user profile")
@click.option(
"--profile",
help="Username of profile",
)
def delete_command(profile):
delete_profile(profile)