+8
-5
appview/db/repos.go
+8
-5
appview/db/repos.go
···
467
467
var repos []Repo
468
468
469
469
rows, err := e.Query(
470
-
`select did, name, knot, rkey, description, created, at_uri, source
471
-
from repos
472
-
where did = ? and source is not null and source != ''
473
-
order by created desc`,
474
-
did,
470
+
`select distinct r.did, r.name, r.knot, r.rkey, r.description, r.created, r.at_uri, r.source
471
+
from repos r
472
+
left join collaborators c on r.at_uri = c.repo_at
473
+
where (r.did = ? or c.subject_did = ?)
474
+
and r.source is not null
475
+
and r.source != ''
476
+
order by r.created desc`,
477
+
did, did,
475
478
)
476
479
if err != nil {
477
480
return nil, err