"use strict";

import placeToEat from "../domain/placeToEat";

// First implementation always return the same in memory hardcoded place :)
function selectAPlaceToEat() {
    return () => placeToEat({ id: 123, name: "My House", cuisine: "American" });
};

// Enums. // Maybe move to their own module.
selectAPlaceToEat.RANDOM = "random";
selectAPlaceToEat.POPULAR = "popular";
selectAPlaceToEat.CUISINE = "cuisine";

export default selectAPlaceToEat;

"use strict";

import domain from "../domain";

// First implementation always return the same in memory hardcoded place :)
function selectAPlaceToEat() {
    let repo = domain.getPlacesRepo();
    return () => repo.fetchRandom();
};

// Enums. // Maybe move to their own module.
selectAPlaceToEat.RANDOM = "random";
selectAPlaceToEat.POPULAR = "popular";
selectAPlaceToEat.CUISINE = "cuisine";

export default selectAPlaceToEat;

Update action to use domain register for places repo.
Update action to use domain register for places repo.
