feat: implement context sanity checks

This commit is contained in:
Aarnav Tale 2024-03-30 01:48:35 -04:00
parent e216d4171f
commit 4e129d527a
No known key found for this signature in database
3 changed files with 102 additions and 22 deletions

View file

@ -18,8 +18,12 @@ import RenameModal from './rename'
// We do not want to expose every config value
export async function loader() {
const config = await getConfig()
const context = await getContext()
if (!context.hasConfig) {
throw new Error('No configuration is available')
}
const config = await getConfig()
const dns = {
prefixes: config.prefixes,