fix:#3 added error key in slog

This commit is contained in:
Elmar Kresse
2024-05-26 22:47:32 +02:00
parent 1bac9bf187
commit 1267b37ab6
3 changed files with 7 additions and 6 deletions

View File

@@ -81,14 +81,14 @@ func FetchSeminarGroups(app *pocketbase.PocketBase) ([]*models.Record, error) {
collection, dbError := db.FindCollection(app, "groups")
if dbError != nil {
slog.Error("Error while searching collection groups", dbError)
slog.Error("Error while searching collection groups", "error", dbError)
return nil, err
}
var insertedGroups []*models.Record
insertedGroups, dbError = db.SaveGroups(groups, collection, app)
if dbError != nil {
slog.Error("Error while saving groups", dbError)
slog.Error("Error while saving groups", "error", dbError)
return nil, err
}