Beispiel #1
0
def add_icon_info(appname):
    if appname not in MONGO_CONFIG:
        return json_response_error(PARAM_ERROR, msg="appname error")
    data = request.form
    new_data = get_params(Icon.params, data)
    new_data["icon"] = request.files.get('icon')

    return create_icon(appname, new_data)
Beispiel #2
0
def modify_icon_info(appname):
    if appname not in MONGO_CONFIG:
        return json_response_error(PARAM_ERROR, msg="appname error")
    args = check_id_params(request)
    if isinstance(args, Response):
        return args
    data = request.form
    new_data = get_params(Icon.params, data)
    new_data["icon"] = request.files.get('icon')
    return mod_icon(appname, args, new_data)