Skip to content

Commit

Permalink
fix(api): report proper publish status on dataset get
Browse files Browse the repository at this point in the history
  • Loading branch information
b5 committed Aug 29, 2019
1 parent 96e28e4 commit 2242fb7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions api/datasets.go
Original file line number Diff line number Diff line change
Expand Up @@ -282,12 +282,15 @@ func (h *DatasetHandlers) getHandler(w http.ResponseWriter, r *http.Request) {
util.WriteErrResponse(w, http.StatusInternalServerError, err)
return
}

// TODO (b5) - remove this. res.Ref should be used instead
ref := repo.DatasetRef{
Peername: res.Dataset.Peername,
ProfileID: profile.ID(res.Dataset.ProfileID),
Name: res.Dataset.Name,
Path: res.Dataset.Path,
FSIPath: res.Ref.FSIPath,
Published: res.Ref.Published,
Dataset: res.Dataset,
}
util.WriteResponse(w, ref)
Expand Down
2 changes: 2 additions & 0 deletions api/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,14 @@ func (mh *RootHandler) Handler(w http.ResponseWriter, r *http.Request) {
return
}

// TODO (b5) - why is this necessary?
ref = repo.DatasetRef{
Peername: res.Dataset.Peername,
ProfileID: profile.ID(res.Dataset.ProfileID),
Name: res.Dataset.Name,
Path: res.Dataset.Path,
FSIPath: res.Ref.FSIPath,
Published: res.Ref.Published,
Dataset: res.Dataset,
}

Expand Down

0 comments on commit 2242fb7

Please sign in to comment.