Run prettier formatter

This commit is contained in:
Brian Bowman
2022-07-19 04:37:38 -05:00
parent e9df0f17db
commit eb9aa34323
67 changed files with 1157 additions and 1071 deletions

View File

@@ -4,10 +4,12 @@ export async function toggleEncryption(path: string) {
let serverConf
try {
serverConf = JSON.parse(await invoke('read_file', {
path,
}))
} catch(e) {
serverConf = JSON.parse(
await invoke('read_file', {
path,
})
)
} catch (e) {
console.log(`Server config at ${path} not found or invalid`)
return
}
@@ -28,13 +30,15 @@ export async function encryptionEnabled(path: string) {
let serverConf
try {
serverConf = JSON.parse(await invoke('read_file', {
path,
}))
} catch(e) {
serverConf = JSON.parse(
await invoke('read_file', {
path,
})
)
} catch (e) {
console.log(`Server config at ${path} not found or invalid`)
return false
}
return serverConf.server.http.encryption.useEncryption
}
}