added prefix scan and fixed logout issue

This commit is contained in:
ston1th 2019-07-06 11:31:12 +02:00
commit 8143e484cd
12 changed files with 99 additions and 77 deletions

View file

@ -21,10 +21,8 @@ var migrators = []migrator{
version = 1
// recreate all pages with new format
var pages []string
db.store.ForEach(func(k string, _ []byte) error {
if trim, ok := hasTrimPrefix(k, pagePrefix); ok {
pages = append(pages, trim)
}
db.store.ForEachPrefix(pagePrefix, func(k string, _ []byte) error {
pages = append(pages, k)
return nil
})
var p core.Page