mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-13 17:56:25 +00:00
rename transform method migrateFromV6Storage
This commit is contained in:
@@ -4,7 +4,7 @@ const keygen = require('browser/lib/keygen')
|
||||
const _ = require('lodash')
|
||||
const CSON = require('season')
|
||||
|
||||
function transform (storagePath) {
|
||||
function migrateFromV5Storage (storagePath) {
|
||||
var boostnoteJSONPath = path.join(storagePath, 'boostnote.json')
|
||||
return Promise.resolve()
|
||||
.then(function readBoostnoteJSON () {
|
||||
@@ -81,5 +81,5 @@ function transform (storagePath) {
|
||||
})
|
||||
}
|
||||
|
||||
module.exports = transform
|
||||
module.exports = migrateFromV5Storage
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
const _ = require('lodash')
|
||||
const path = require('path')
|
||||
const CSON = require('season')
|
||||
const transform = require('./transform')
|
||||
const migrateFromV6Storage = require('./migrateFromV6Storage')
|
||||
|
||||
function resolveStorageData (storageCache) {
|
||||
let storage = {
|
||||
@@ -32,7 +32,7 @@ function resolveStorageData (storageCache) {
|
||||
return Promise.resolve(storage)
|
||||
}
|
||||
console.log('Transform Legacy storage', storage.path)
|
||||
return transform(storage.path)
|
||||
return migrateFromV6Storage(storage.path)
|
||||
.then(() => storage)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user