fix(server): repair recursive withUser, gofmt 2 files (golangci-lint)
This commit is contained in:
@@ -302,4 +302,3 @@ func uuidsToStrings(ids []pgtype.UUID) []string {
|
|||||||
}
|
}
|
||||||
return out
|
return out
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ func newRequestsRouter(h *handlers) chi.Router {
|
|||||||
|
|
||||||
// withUser injects a user into the request context the same way RequireUser does.
|
// withUser injects a user into the request context the same way RequireUser does.
|
||||||
func withUser(req *http.Request, user dbq.User) *http.Request {
|
func withUser(req *http.Request, user dbq.User) *http.Request {
|
||||||
return withUser(req, user)
|
return req.WithContext(context.WithValue(req.Context(), userCtxKeyForTest(), user))
|
||||||
}
|
}
|
||||||
|
|
||||||
// doCreateRequest fires POST /api/requests with the given JSON body as the given user.
|
// doCreateRequest fires POST /api/requests with the given JSON body as the given user.
|
||||||
|
|||||||
@@ -204,4 +204,3 @@ func (p *theAudioDBProvider) TestConnection(ctx context.Context) error {
|
|||||||
}
|
}
|
||||||
return p.client.getJSON(ctx, p.jsonURL("album-mb.php?i="+theAudioDBTestSampleMBID), &resp)
|
return p.client.getJSON(ctx, p.jsonURL("album-mb.php?i="+theAudioDBTestSampleMBID), &resp)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user