config: add support for "list" type

"list" is a list of strings, represented in the .ini as repeated entries
for a field, e.g.
url = myurl1
url = myurl2
Shown in the UI as multiple inputs with delete buttons.
This commit is contained in:
Harvey Tindall
2024-08-20 20:19:32 +01:00
parent b2771e6cc5
commit 6bad293f74
6 changed files with 169 additions and 40 deletions

View File

@@ -585,7 +585,7 @@ func (app *appContext) MatrixLogin(gc *gin.Context) {
respond(401, "Unauthorized", gc)
return
}
tempConfig, _ := ini.Load(app.configPath)
tempConfig, _ := ini.ShadowLoad(app.configPath)
matrix := tempConfig.Section("matrix")
matrix.Key("enabled").SetValue("true")
matrix.Key("homeserver").SetValue(req.Homeserver)