Fix nil pointer interface assignment (#750)

This commit is contained in:
Jesse Peterson
2021-06-09 16:01:53 -07:00
committed by GitHub
parent 0ba759a5c1
commit bc8f82dc82
2 changed files with 5 additions and 1 deletions

View File

@@ -3,6 +3,7 @@
- Fix SetFirmwarePassword and VerifyFirmwarePassword parameters (#743)
- Command UUID can now be passed in as as a request parameter (#754)
- Update to SCEP v2, switch to Mozilla PKCS7 fork, interface cleanup (#737)
- Fix panic when using DEP mdmctl commands with no DEP tokens configured (#750)
## [v1.8.0](https://github.com/micromdm/micromdm/compare/v1.7.1...v1.8.0) February, 2021

View File

@@ -232,7 +232,6 @@ func serve(args []string) error {
ctx := context.Background()
httpLogger := log.With(logger, "transport", "http")
dc := sm.DEPClient
appDB := &appsbuiltin.Repo{Path: *flRepoPath}
scepEndpoints := scep.MakeServerEndpoints(sm.SCEPService)
@@ -296,6 +295,10 @@ func serve(args []string) error {
commandEndpoints := command.MakeServerEndpoints(sm.CommandService, basicAuthEndpointMiddleware)
command.RegisterHTTPHandlers(r, commandEndpoints, options...)
var dc depapi.DEPClient
if sm.DEPClient != nil {
dc = sm.DEPClient
}
depsvc := depapi.New(dc, sm.PubClient)
depsvc.Run()
depEndpoints := depapi.MakeServerEndpoints(depsvc, basicAuthEndpointMiddleware)