Add Global Settings into DB initilization step

This commit is contained in:
Khanh Ngo 2020-04-23 23:40:44 +07:00
parent 38c1f3a302
commit 5e7cfbd01f
No known key found for this signature in database
GPG key ID: D5FAA6A16150E49E
4 changed files with 31 additions and 3 deletions

View file

@ -269,7 +269,8 @@ func MachineIPAddresses() echo.HandlerFunc {
if err != nil {
log.Warn("Cannot get machine public ip address: ", err)
} else {
interfaceList = append(interfaceList, publicInterface)
// prepend public ip to the list
interfaceList = append([]model.Interface{publicInterface}, interfaceList...)
}
return c.JSON(http.StatusOK, interfaceList)