1
This commit is contained in:
@@ -23,3 +23,15 @@ func (c *kgEntity) List(ctx context.Context, req *dto.ListKgEntityReq) (*dto.Lis
|
||||
PageSize: req.PageSize,
|
||||
}, nil
|
||||
}
|
||||
|
||||
func (c *kgEntity) Sources(ctx context.Context, req *dto.SourcesKgEntityReq) (*dto.SourcesKgEntityRes, error) {
|
||||
list, err := service.KgEntityService.Sources(ctx, req.DatasetId)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
out := make([]*dto.KgEntitySourceItem, 0, len(list))
|
||||
for _, s := range list {
|
||||
out = append(out, &dto.KgEntitySourceItem{Name: s.Name, Files: s.Files})
|
||||
}
|
||||
return &dto.SourcesKgEntityRes{List: out}, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user