forked from kompetenzinventar/ki-backend
Add a CLI to delete a user with it's profile information
This commit is contained in:
@ -6,9 +6,19 @@ import click
|
||||
|
||||
from app import app
|
||||
from ki.actions import seed
|
||||
from ki.actions import delete_profile
|
||||
|
||||
|
||||
@app.cli.command("seed")
|
||||
@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)
|
||||
|
Reference in New Issue
Block a user