Added an endpoint to get habits from db