{"size": 1427, "ext": "js", "max_stars_repo_path": "src/redux/actions/product.js", "max_stars_repo_name": "chlasswg26/blanjaa", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/redux/actions/product.js", "max_issues_repo_name": "chlasswg26/blanjaa", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/redux/actions/product.js", "max_forks_repo_name": "chlasswg26/blanjaa", "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": 22.6507936508, "max_line_length": 61, "alphanum_fraction": 0.6699369306}
import {
    GetProductAction,
    GetProductByIdAction,
    GetProductBySellerAction,
    PostProductAction,
    PutProductAction,
    DeleteProductAction
} from './actionTypes'
import {
    GetProduct,
    GetProductById,
    GetProductBySeller,
    PostProduct,
    PutProduct,
    DeleteProduct
} from '../../utils/Http'

const GetProductActionCreator = (filter) => {
    return {
        type: GetProductAction,
        payload: GetProduct(filter)
    }
}
const GetProductByIdActionCreator = (id) => {
    return {
        type: GetProductByIdAction,
        payload: GetProductById(id)
    }
}
const GetProductBySellerActionCreator = (seller, filter) => {
    return {
        type: GetProductBySellerAction,
        payload: GetProductBySeller(seller, filter)
    }
}
const PostProductActionCreator = (body, token) => {
    return {
        type: PostProductAction,
        payload: PostProduct(body, token)
    }
}
const PutProductActionCreator = (id, body, token) => {
    return {
        type: PutProductAction,
        payload: PutProduct(id, body, token)
    }
}
const DeleteProductActionCreator = (id, token) => {
    return {
        type: DeleteProductAction,
        payload: DeleteProduct(id, token)
    }
}

export {
    GetProductActionCreator,
    GetProductByIdActionCreator,
    GetProductBySellerActionCreator,
    PostProductActionCreator,
    PutProductActionCreator,
    DeleteProductActionCreator
}
