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

View File

@@ -18,18 +18,18 @@ func (dao *Dao) CollectionQuery() *dbx.SelectQuery {
// FindCollectionsByType finds all collections by the given type
func (dao *Dao) FindCollectionsByType(collectionType string) ([]*models.Collection, error) {
models := []*models.Collection{}
collections := []*models.Collection{}
err := dao.CollectionQuery().
AndWhere(dbx.HashExp{"type": collectionType}).
OrderBy("created ASC").
All(&models)
All(&collections)
if err != nil {
return nil, err
}
return models, nil
return collections, nil
}
// FindCollectionByNameOrId finds the first collection by its name or id.