var switch, fmt, npe fix

This commit is contained in:
2026-03-12 19:22:14 +01:00
parent 8c06024fe5
commit d007569f93
6 changed files with 21 additions and 29 deletions

View File

@@ -70,8 +70,13 @@ func toProtoCollectionoffsetSqlc(rows []db.GetCollectionByOffsetRow) *v1.Collect
})
}
name := "Empty Collection"
if len(rows) > 0 {
name = rows[0].Name.String
}
return &v1.CollectionResponse{
Name: rows[0].Name.String,
Name: name,
Items: int32(len(rows)),
Songs: songs,
}