@RequestMapping(value = "/api/plans/{uid}", method = RequestMethod.GET)
    public
    @ResponseBody
    String findPlansByUid(@PathVariable Long uid) throws JSONException {
        User starter = userRepository.findOne(uid);

        List<Plan> allPlans = planRepository.findAll();
        Set<Plan> uidPlans = Sets.newHashSet();
        for (Plan plan : allPlans) {
            if (starter.equals(plan.getStarter())) {
                uidPlans.add(plan);
                continue;
            }

            if (plan.getJoiners().contains(starter)) {
                uidPlans.add(plan);
            }
        }

        return getPlansJson(uidPlans, starter).toString();
    }