You've already forked filebrowser
mirror of
https://github.com/filebrowser/filebrowser.git
synced 2025-11-26 14:25:26 +08:00
🧹: gofmt
Former-commit-id: 9548d370497e13d436abbc670cf40d360badab9f [formerly f29ba9c4dcf9962c3a5045629526296cd2b43ad8] [formerly 3f89c094c1b3330c8d6f1b2379d6309567d12210 [formerly 92fda0070c]]
Former-commit-id: 4ad64211019e0236f0eaa6e041a8793e899954fe [formerly 6bf71ffba205b563ff6cd0c7487d9a328c757686]
Former-commit-id: 4c7afe072fc3e2a225ca5a7dbf3f3beb66b44058
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
package bolt
|
||||
|
||||
import (
|
||||
"github.com/filebrowser/filebrowser/v2/settings"
|
||||
"github.com/asdine/storm"
|
||||
"github.com/filebrowser/filebrowser/v2/auth"
|
||||
"github.com/filebrowser/filebrowser/v2/settings"
|
||||
"github.com/filebrowser/filebrowser/v2/share"
|
||||
"github.com/filebrowser/filebrowser/v2/storage"
|
||||
"github.com/filebrowser/filebrowser/v2/users"
|
||||
@@ -13,13 +13,13 @@ import (
|
||||
func NewStorage(db *storm.DB) *storage.Storage {
|
||||
users := users.NewStorage(usersBackend{db: db})
|
||||
share := share.NewStorage(shareBackend{db: db})
|
||||
settings := settings.NewStorage(settingsBackend{ db: db})
|
||||
settings := settings.NewStorage(settingsBackend{db: db})
|
||||
auth := auth.NewStorage(authBackend{db: db}, users)
|
||||
|
||||
return &storage.Storage{
|
||||
Auth: auth,
|
||||
Users: users,
|
||||
Share: share,
|
||||
Auth: auth,
|
||||
Users: users,
|
||||
Share: share,
|
||||
Settings: settings,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ func (s shareBackend) GetPermanent(path string, id uint) (*share.Link, error) {
|
||||
if err == storm.ErrNotFound {
|
||||
return nil, errors.ErrNotExist
|
||||
}
|
||||
|
||||
|
||||
return &v, err
|
||||
}
|
||||
|
||||
|
||||
@@ -10,8 +10,8 @@ import (
|
||||
// Storage is a storage powered by a Backend whih makes the neccessary
|
||||
// verifications when fetching and saving data to ensure consistency.
|
||||
type Storage struct {
|
||||
Users *users.Storage
|
||||
Share *share.Storage
|
||||
Auth *auth.Storage
|
||||
Users *users.Storage
|
||||
Share *share.Storage
|
||||
Auth *auth.Storage
|
||||
Settings *settings.Storage
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user