Default to empty list instead of nil in media response

This commit is contained in:
Kailash Nadh 2020-06-24 19:50:53 +05:30
parent 693b939a72
commit a03c7bd7c9
1 changed files with 1 additions and 1 deletions

View File

@ -112,7 +112,7 @@ func handleUploadMedia(c echo.Context) error {
func handleGetMedia(c echo.Context) error {
var (
app = c.Get("app").(*App)
out []media.Media
out = []media.Media{}
)
if err := app.queries.GetMedia.Select(&out); err != nil {