updated db pool limits, added logs VACUUM, updated api docs

This commit is contained in:
Gani Georgiev
2022-11-13 00:38:18 +02:00
parent 39dc1d2795
commit 521df149a2
64 changed files with 650 additions and 751 deletions
+1 -1
View File
@@ -155,7 +155,7 @@ func (form *RecordOAuth2Login) Submit(
createForm := NewRecordUpsert(form.app, authRecord)
createForm.SetFullManageAccess(true)
createForm.SetDao(txDao)
if authUser.Username != "" {
if authUser.Username != "" && usernameRegex.MatchString(authUser.Username) {
createForm.Username = form.dao.SuggestUniqueAuthRecordUsername(form.collection.Id, authUser.Username)
}
+5
View File
@@ -72,6 +72,11 @@ func (form *SettingsUpsert) Submit(interceptors ...InterceptorFunc) error {
time.Now().AddDate(0, 0, -1*form.Settings.Logs.MaxDays),
)
if form.Settings.Logs.MaxDays == 0 {
// reclaim deleted logs disk space
form.app.LogsDao().Vacuum()
}
// merge the application settings with the form ones
return form.app.Settings().Merge(form.Settings)
}, interceptors...)