package v1

import (
	"github.com/labstack/echo"
	"net/http"
	"git.mowie.cc/konrad/Library/models"
)

func PublishersList(c echo.Context) error {

	list, err := models.ListPublishers("")

	if err != nil{
		return c.JSON(http.StatusInternalServerError, models.Message{"Error getting publishers"})
	}

	return c.JSON(http.StatusOK, list)
}