use model in route to fetch json data