Skip to content

Commit

Permalink
fix: small update
Browse files Browse the repository at this point in the history
  • Loading branch information
atinux committed Feb 16, 2024
1 parent 0d9a875 commit 14c3d7a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions cli/commands/whoami.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ export default defineCommand({
async setup() {
const config = loadConfig()
if (!config.token) {
consola.log('Not currently logged in.')
consola.info('Not currently logged in.')
return
}

const user = await $api('/user')
const user = await $api('/user').catch(() => null)
if (!user?.name) {
consola.log('Not currently logged in.')
consola.info('Not currently logged in.')
return
}
consola.info(`Logged in as \`${user.name}\``)
Expand Down
2 changes: 1 addition & 1 deletion cli/utils.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { ofetch } from 'ofetch'

const CONFIG_DIR = XDGAppPaths('com.nuxt.hub.cli').dataDirs()[0]
const CONFIG_PATH = join(CONFIG_DIR, 'auth.json')
export const NUXT_HUB_URL = process.env.NUXT_HUB_URL || 'http://nuxthub-admin.pages.dev'
export const NUXT_HUB_URL = process.env.NUXT_HUB_URL || 'https://nuxthub-admin.pages.dev'

export function loadConfig() {
try {
Expand Down

0 comments on commit 14c3d7a

Please sign in to comment.