mirror of
https://github.com/pockethost/pockethost.git
synced 2025-06-23 14:32:31 +00:00
fix: URL not defined in migration
This commit is contained in:
parent
30ea41a28b
commit
f49c7f1ce3
@ -21,13 +21,14 @@ migrate(
|
||||
if (!newValue || settings.meta[field] !== APP_DEFAULTS[field]) return
|
||||
settings.meta[field] = newValue
|
||||
}
|
||||
const { hostname } = new URL(PH_INSTANCE_URL)
|
||||
fix(`appName`, PH_APP_NAME)
|
||||
fix(`appUrl`, PH_INSTANCE_URL)
|
||||
fix(`senderName`, PH_APP_NAME)
|
||||
fix(`senderAddress`, `${PH_APP_NAME}@${hostname}`)
|
||||
fix(`senderAddress`, `${PH_APP_NAME}@app.pockethost.io`)
|
||||
|
||||
dao.saveSettings(settings)
|
||||
|
||||
console.error(`***defaults successfully applied`)
|
||||
} catch (e) {
|
||||
console.error(`***error applying defaults: ${e}`)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user