fix(backup): restore db and tests

This commit is contained in:
henry.chen
2023-07-12 17:26:44 +08:00
parent 9a1b4db61a
commit f28d0e77e0
6 changed files with 64 additions and 55 deletions

View File

@@ -326,6 +326,11 @@ func (db *mongodb) LoadArticleList(ctx context.Context, search SearchArticles) (
return articles, int(count), nil
}
// DropDatabase drop eiblog database
func (db *mongodb) DropDatabase(ctx context.Context) error {
return db.Database(mongoDBName).Drop(ctx)
}
// counter counter
type counter struct {
Name string