/*
 * Copyright (c) 2013 Lucas Holt
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 * SUCH DAMAGE.
 */

package com.justjournal.ctl.api;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.justjournal.model.User;
import com.justjournal.model.api.PublicMember;
import com.justjournal.repository.UserRepository;
import com.justjournal.services.UserService;
import lombok.*;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.Collections;
import java.util.List;

/**
 * @author Lucas Holt
 */
@Slf4j
@RestController
@RequestMapping("/api/members")
public class MembersController {

    private final UserService userService;

    @Autowired
    public MembersController(final UserService userService) {
        this.userService = userService;
    }

    /**
     * All moods usable by blogs
     *
     * @return mood list
     */

    @RequestMapping(method = RequestMethod.GET, headers = "Accept=*/*", produces = MediaType.APPLICATION_JSON_VALUE)
    @ResponseBody
    public ResponseEntity<List<PublicMember>> list() {

        try {
            final List<PublicMember> publicMembers = userService.getPublicMembers();
            return ResponseEntity.ok().eTag(Integer.toString(publicMembers.hashCode())).body(publicMembers);
        } catch (final Exception e) {
            log.error(e.getMessage(), e);
        }

         return new ResponseEntity<>(Collections.<PublicMember>emptyList(), HttpStatus.INTERNAL_SERVER_ERROR);
    }


}

@@ -2285,16 +2285,72 @@
 t;%0A%0A/**%0A
+ * Get the list of site members/users that are public. %0A
  * @auth
@@ -2648,28 +2648,42 @@
 ll m
-oods usable by blogs
+embers of the site that are public
 %0A   
@@ -2706,11 +2706,13 @@
 rn m
-ood
+ember
  lis
@@ -2721,17 +2721,16 @@
      */%0A
-%0A
     @Req

fix comments