{"size": 796, "ext": "js", "max_stars_repo_path": "shell/src/actions/property.js", "max_stars_repo_name": "yzqlwt/EasyStudio", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "shell/src/actions/property.js", "max_issues_repo_name": "yzqlwt/EasyStudio", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "shell/src/actions/property.js", "max_forks_repo_name": "yzqlwt/EasyStudio", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 31.84, "max_line_length": 95, "alphanum_fraction": 0.5464824121}
import { PROPERTY, DEFAULT_MANAGE_PREFIX, SYMBOL_FOR_FETCH_API } from '../constants/fetchType';
import { GET } from '../constants/methodType';
import { trimStart } from 'lodash';

const PROPERTY_URI = '/properties';

export const fetchProperty = function (searchValues) {
    return {
        [SYMBOL_FOR_FETCH_API]: {
            types: [
                PROPERTY[DEFAULT_MANAGE_PREFIX],
                PROPERTY[`${DEFAULT_MANAGE_PREFIX}_SUCCESS`],
                PROPERTY[`${DEFAULT_MANAGE_PREFIX}_FAIL`],
            ],
            uri: `/${trimStart(PROPERTY_URI, '/')}`,
            method: 'get',
            body: {
                ...searchValues,
            },
            onSuccess: ()=> console.log("onSuccess"),
            onFail: ()=> console.log("onFail"),
        },
    };
};
