working settings update.
Settings are loaded from the DB and added to the AppConfig during startup. When updating settings, they are stored in AppConfig, and written do the database.
This commit is contained in:
@@ -11,7 +11,7 @@ func GetSettings(c *gin.Context) {
|
||||
logger := c.MustGet("LOGGER").(logrus.FieldLogger)
|
||||
deviceRepo := c.MustGet("DEVICE_REPOSITORY").(database.DeviceRepo)
|
||||
|
||||
settings, err := deviceRepo.GetSettings(c)
|
||||
settings, err := deviceRepo.LoadSettings(c)
|
||||
if err != nil {
|
||||
logger.Errorln("An error occurred while retrieving settings", err)
|
||||
c.JSON(http.StatusInternalServerError, gin.H{"success": false})
|
||||
|
||||
Reference in New Issue
Block a user