
debug
async def handle(params_kw):
    logger.debug(f'{params_kw=}')

    # 调用 delete_document
    success = await delete_document(
        db_type=params_kw.db_type,
        userid=params_kw.userid,
        filename=params_kw.filename
    )

    if success:
        return {
            "widgettype": "Message",
            "options": {
                "archor": "cc",
                "timeout": 5,
                "auto_open": True,
                "auto_dismiss": True,
                "auto_destroy": True,
                "cwidth": 23,
                "cheight": 17,
                "title": "Success",
                "message": "文件删除成功"
            }
        }
    return {
        "widgettype": "Error",
        "options": {
            "archor": "cc",
            "timeout": 5,
            "auto_open": True,
            "auto_dismiss": True,
            "auto_destroy": True,
            "cwidth": 23,
            "cheight": 17,
            "title": "Error",
            "message": "文件删除失败"
        }
    }