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-07 22:04:03 +02:00
|
|
|
|
2021-06-26 10:51:39 +02:00
|
|
|
from app import app
|
|
|
|
from ki.actions import seed
|
2022-01-23 21:24:38 +01:00
|
|
|
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)
|
2022-01-23 21:24:38 +01:00
|
|
|
|
|
|
|
|
|
|
|
@app.cli.command("delete", help="Delete a user profile")
|
|
|
|
@click.option(
|
|
|
|
"--profile",
|
|
|
|
help="Username of profile",
|
|
|
|
)
|
|
|
|
def delete_command(profile):
|
|
|
|
delete_profile(profile)
|