{"size": 519, "ext": "js", "max_stars_repo_path": "app/store/actions/news.actions.js", "max_stars_repo_name": "CodesDaniel/NBA_APP", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "app/store/actions/news.actions.js", "max_issues_repo_name": "CodesDaniel/NBA_APP", "max_issues_repo_issues_event_min_datetime": "2020-09-07T03:56:45.000Z", "max_issues_repo_issues_event_max_datetime": "2021-05-10T12:34:38.000Z", "max_forks_repo_path": "app/store/actions/news.actions.js", "max_forks_repo_name": "CodesDaniel/NBA_APP", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": 3, "max_forks_count": null, "avg_line_length": 23.5909090909, "max_line_length": 61, "alphanum_fraction": 0.527938343}
import { GET_ALL_NEWS } from "../types";
import axios from "axios";
import { DB_URL, FirebaseData } from "../../../utils/config";
import data from "../../database/data"


export  const  getAllNews= ()=>{
    const request =  axios.get(`${DB_URL}/news.json`)
        .then(response=>{
            return FirebaseData(response.data)
            })
            .catch(e=>{
                console.warn(e)
                return false
        })
    
    return {
        type:GET_ALL_NEWS,
        payload:request
    }
}
