mirror of
https://github.com/gofiber/storage.git
synced 2025-10-05 08:37:10 +08:00
🩹 fix reset
This commit is contained in:
@@ -74,7 +74,7 @@ func New(config ...Config) *Storage {
|
|||||||
db := client.Database(cfg.Database)
|
db := client.Database(cfg.Database)
|
||||||
col := db.Collection(cfg.Collection)
|
col := db.Collection(cfg.Collection)
|
||||||
|
|
||||||
if cfg.Clear {
|
if cfg.Reset {
|
||||||
if err = col.Drop(context.Background()); err != nil {
|
if err = col.Drop(context.Background()); err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user