chore: remove dead code
This commit is contained in:
parent
446ac9f8db
commit
19c7d73444
6 changed files with 1 additions and 117 deletions
|
|
@ -474,8 +474,4 @@ function migrate (config, accounts) {
|
|||
}
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
migrateConfig,
|
||||
migrateAccounts,
|
||||
migrate
|
||||
}
|
||||
module.exports = { migrate }
|
||||
|
|
|
|||
|
|
@ -7,10 +7,7 @@ const resolvers = {
|
|||
},
|
||||
Mutation: {
|
||||
saveAccounts: (...[, { accounts }]) => settingsLoader.saveAccounts(accounts),
|
||||
// resetAccounts: (...[, { schemaVersion }]) => settingsLoader.resetAccounts(schemaVersion),
|
||||
saveConfig: (...[, { config }]) => settingsLoader.saveConfig(config),
|
||||
// resetConfig: (...[, { schemaVersion }]) => settingsLoader.resetConfig(schemaVersion),
|
||||
// migrateConfigAndAccounts: () => settingsLoader.migrate()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -8,10 +8,7 @@ const typeDef = gql`
|
|||
|
||||
type Mutation {
|
||||
saveAccounts(accounts: JSONObject): JSONObject @auth
|
||||
# resetAccounts(schemaVersion: Int): JSONObject @auth
|
||||
saveConfig(config: JSONObject): JSONObject @auth
|
||||
# resetConfig(schemaVersion: Int): JSONObject @auth
|
||||
# migrateConfigAndAccounts: JSONObject @auth
|
||||
}
|
||||
`
|
||||
|
||||
|
|
|
|||
|
|
@ -80,17 +80,6 @@ function saveAccounts (accounts) {
|
|||
}).catch(console.error)
|
||||
})
|
||||
}
|
||||
function resetAccounts (schemaVersion) {
|
||||
return db.none(
|
||||
accountsSql,
|
||||
[
|
||||
'accounts',
|
||||
{ accounts: NEW_SETTINGS_LOADER_SCHEMA_VERSION ? {} : [] },
|
||||
true,
|
||||
schemaVersion
|
||||
]
|
||||
)
|
||||
}
|
||||
|
||||
function loadAccounts (schemaVersion) {
|
||||
const sql = `SELECT data
|
||||
|
|
@ -149,18 +138,6 @@ function migrationSaveConfig (config) {
|
|||
})
|
||||
}
|
||||
|
||||
function resetConfig (schemaVersion) {
|
||||
return db.none(
|
||||
configSql,
|
||||
[
|
||||
'config',
|
||||
{ config: schemaVersion === NEW_SETTINGS_LOADER_SCHEMA_VERSION ? {} : [] },
|
||||
true,
|
||||
schemaVersion
|
||||
]
|
||||
)
|
||||
}
|
||||
|
||||
function loadLatest (schemaVersion) {
|
||||
return Promise.all([loadLatestConfigOrNoneReturningVersion(schemaVersion), loadAccounts(schemaVersion)])
|
||||
.then(([configObj, accounts]) => ({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue