Don't require http:// on hostname for cli

This commit is contained in:
dholms 2022-04-12 13:42:22 -05:00
parent 36f752085c
commit 74d04398ba
2 changed files with 3 additions and 1 deletions
cli/src
commands/setup
lib

@ -54,6 +54,8 @@ export default cmd({
console.log('Generating repo...')
const serverCleaned = server.replace('http://', '').replace('https://', '')
await config.writeCfg(REPO_PATH, username, server)
const client = await loadDelegate(REPO_PATH)

@ -6,7 +6,7 @@ export const loadDelegate = async (
): Promise<MicroblogDelegator> => {
const { account, keypair, ucanStore } = await config.loadCfg(repoPath)
return new MicroblogDelegator(
account.server,
'http://' + account.server,
keypair.did(),
keypair,
ucanStore,