def METHOD_NAME():
    context = {u'user': g.user}
    check_access('hdx_quick_links_update', context, {})
    item = _process_request()
    if item:
        existing_setting_list = get_action('hdx_quick_links_settings_show')({'not_initial': True}, {})
        # self._persist_file(item)
        if item.pop('new'):
            existing_setting_list.append(item)
        else:
            existing_index, existing_element = _find_quick_links_item_by_id(existing_setting_list, item.get('id'))
            existing_setting_list[existing_index] = item
        data_dict = {
            'hdx.quick_links.config': _sort_quick_links_items(existing_setting_list)
        }
        ret = get_action('hdx_quick_links_settings_update')({}, data_dict)
    else:
        ret = json.dumps({
            'message': _('Badly formatted data')
        })
    # response.headers['Content-Type'] = CONTENT_TYPES['json']
    return ret