refactor: move pwa/build-info -> appConfig (#1508)

This commit is contained in:
Daniel Roe 2023-01-29 06:18:27 -08:00 committed by GitHub
parent 1c9004a731
commit 415d36ce32
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 27 additions and 18 deletions

View file

@ -12,6 +12,9 @@ import type { Storage } from 'unstorage'
import cached from './cache-driver'
// @ts-expect-error virtual import
import { env } from '#build-info'
import type { AppInfo } from '~/types'
import { APP_NAME } from '~/constants'
@ -45,7 +48,7 @@ async function fetchAppInfo(origin: string, server: string) {
const app: AppInfo = await $fetch(`https://${server}/api/v1/apps`, {
method: 'POST',
body: {
client_name: APP_NAME + (config.public.env !== 'release' ? ` (${config.public.env})` : ''),
client_name: APP_NAME + (env !== 'release' ? ` (${env})` : ''),
website: 'https://elk.zone',
redirect_uris: getRedirectURI(origin, server),
scopes: 'read write follow push',