mirror of
https://github.com/gravitl/netmaker.git
synced 2024-09-20 15:26:04 +08:00
add emqx creds creation to go routine
This commit is contained in:
parent
60e5951dba
commit
c8e65f4820
|
@ -553,7 +553,7 @@ func authenticateHost(response http.ResponseWriter, request *http.Request) {
|
|||
logic.ReturnErrorResponse(response, request, errorResponse)
|
||||
return
|
||||
}
|
||||
|
||||
go func() {
|
||||
// Create EMQX creds and ACLs if not found
|
||||
if servercfg.GetBrokerType() == servercfg.EmqxBrokerType {
|
||||
if err := mq.GetEmqxHandler().CreateEmqxUser(host.ID.String(), authRequest.Password); err != nil {
|
||||
|
@ -573,6 +573,7 @@ func authenticateHost(response http.ResponseWriter, request *http.Request) {
|
|||
}
|
||||
}
|
||||
}
|
||||
}()
|
||||
|
||||
response.WriteHeader(http.StatusOK)
|
||||
response.Header().Set("Content-Type", "application/json")
|
||||
|
|
Loading…
Reference in a new issue