diff --git a/db/db.go b/db/db.go index 5797971fd..072c6e1a5 100644 --- a/db/db.go +++ b/db/db.go @@ -750,8 +750,12 @@ func (db database) GetWorkspaceBountiesCount(r *http.Request, workspace_uuid str } func (db database) GetAssignedBounties(r *http.Request) ([]NewBounty, error) { - offset, limit, sortBy, direction, _ := utils.GetPaginationParams(r) uuid := chi.URLParam(r, "uuid") + if uuid == "" { + return []NewBounty{}, nil + } + + offset, limit, sortBy, direction, _ := utils.GetPaginationParams(r) person := db.GetPersonByUuid(uuid) pubkey := person.OwnerPubKey keys := r.URL.Query() @@ -799,8 +803,12 @@ func (db database) GetAssignedBounties(r *http.Request) ([]NewBounty, error) { } func (db database) GetCreatedBounties(r *http.Request) ([]NewBounty, error) { - offset, limit, sortBy, direction, _ := utils.GetPaginationParams(r) uuid := chi.URLParam(r, "uuid") + if uuid == "" { + return []NewBounty{}, nil + } + + offset, limit, sortBy, direction, _ := utils.GetPaginationParams(r) person := db.GetPersonByUuid(uuid) pubkey := person.OwnerPubKey keys := r.URL.Query() diff --git a/handlers/auth.go b/handlers/auth.go index 15f987eae..f30abeb7e 100644 --- a/handlers/auth.go +++ b/handlers/auth.go @@ -232,6 +232,7 @@ func returnUserMap(p db.Person) map[string]interface{} { user := make(map[string]interface{}) user["id"] = p.ID + user["uuid"] = p.Uuid user["created"] = p.Created user["owner_pubkey"] = p.OwnerPubKey user["owner_alias"] = p.OwnerAlias