vikunja-api/routes/api/v1/lists_list.go

35 lines
828 B
Go
Raw Normal View History

2018-06-10 14:41:42 +02:00
package v1
import (
2018-06-10 14:43:35 +02:00
"github.com/labstack/echo"
2018-06-10 14:41:42 +02:00
"net/http"
)
2018-06-10 14:43:35 +02:00
// GetListsByUser gets all lists a user owns
2018-06-10 14:41:42 +02:00
func GetListsByUser(c echo.Context) error {
2018-06-13 13:45:22 +02:00
// swagger:operation GET /lists lists getLists
// ---
// summary: Gets all lists owned by the current user
// consumes:
// - application/json
// produces:
// - application/json
// responses:
// "200":
// "$ref": "#/responses/List"
// "500":
// "$ref": "#/responses/Message"
2018-06-10 14:41:42 +02:00
2018-07-09 19:49:27 +02:00
/*currentUser, err := models.GetCurrentUser(c)
2018-06-10 14:41:42 +02:00
if err != nil {
return c.JSON(http.StatusInternalServerError, models.Message{"Could not determine the current user."})
}
allLists, err := models.GetListsByUser(&currentUser)
if err != nil {
return c.JSON(http.StatusInternalServerError, models.Message{"Could not get lists."})
2018-07-09 19:49:27 +02:00
}*/
2018-06-10 14:41:42 +02:00
2018-07-09 19:49:27 +02:00
return c.JSON(http.StatusOK, nil)
2018-06-10 14:43:35 +02:00
}