From 1fa82c3b3d0045834180bf1c3983afbdf5f0006e Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Tue, 29 Sep 2020 13:01:04 +0200 Subject: dashboard/app: return BugReport from load_bug API Return BugReport instead of LoadBugResp from load_bug API request. LoadBugResp is some limited subset of info in BugReport (mostly), it's useful to have just one type to describe bug with all needed info. Update #2144 --- dashboard/dashapi/dashapi.go | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) (limited to 'dashboard/dashapi/dashapi.go') diff --git a/dashboard/dashapi/dashapi.go b/dashboard/dashapi/dashapi.go index 7e5b18cf9..a1c5c0f63 100644 --- a/dashboard/dashapi/dashapi.go +++ b/dashboard/dashapi/dashapi.go @@ -507,20 +507,9 @@ type LoadBugReq struct { ID string } -type LoadBugResp struct { - ID string - Title string - Status string - SyzkallerCommit string - Arch string - ReproOpts []byte - ReproSyz []byte - ReproC []byte -} - -func (dash *Dashboard) LoadBug(id string) (*LoadBugResp, error) { +func (dash *Dashboard) LoadBug(id string) (*BugReport, error) { req := LoadBugReq{id} - resp := new(LoadBugResp) + resp := new(BugReport) err := dash.Query("load_bug", req, resp) return resp, err } -- cgit mrf-deployment