mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-29 06:15:29 -04:00
Change schema of url environment variables (#1237)
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
parent
41e493c8bc
commit
a48b4f60bb
18 changed files with 33 additions and 33 deletions
|
@ -11,7 +11,7 @@ export const BANNER_LOCAL_STORAGE_KEY = 'banner.lastModified'
|
|||
|
||||
export const fetchAndSetBanner = async (customizeAssetsUrl: string): Promise<void> => {
|
||||
const cachedLastModified = window.localStorage.getItem(BANNER_LOCAL_STORAGE_KEY)
|
||||
const bannerUrl = `${ customizeAssetsUrl }/banner.txt`
|
||||
const bannerUrl = `${ customizeAssetsUrl }banner.txt`
|
||||
|
||||
if (cachedLastModified) {
|
||||
const response = await fetch(bannerUrl, {
|
||||
|
|
|
@ -19,7 +19,7 @@ export const setUpI18n = async (frontendAssetsUrl: string): Promise<void> => {
|
|||
fallbackLng: 'en',
|
||||
debug: process.env.NODE_ENV !== 'production',
|
||||
backend: {
|
||||
loadPath: `${ frontendAssetsUrl }/locales/{{lng}}.json`
|
||||
loadPath: `${ frontendAssetsUrl }locales/{{lng}}.json`
|
||||
},
|
||||
|
||||
interpolation: {
|
||||
|
|
|
@ -26,7 +26,7 @@ export interface InitTask {
|
|||
|
||||
export const createSetUpTaskList = (frontendAssetsUrl: string, customizeAssetsUrl: string, backendBaseUrl: string): InitTask[] => {
|
||||
setApiUrl({
|
||||
apiUrl: `${ backendBaseUrl }/api/private`
|
||||
apiUrl: `${ backendBaseUrl }api/private/`
|
||||
})
|
||||
|
||||
return [{
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
import { defaultFetchConfig, expectResponseCode } from '../../api/utils'
|
||||
|
||||
export const fetchFrontPageContent = async (customizeAssetsUrl: string): Promise<string> => {
|
||||
const response = await fetch(customizeAssetsUrl + '/intro.md', {
|
||||
const response = await fetch(customizeAssetsUrl + 'intro.md', {
|
||||
...defaultFetchConfig,
|
||||
method: 'GET'
|
||||
})
|
||||
|
|
|
@ -30,7 +30,7 @@ export const SignInButton: React.FC<SignInButtonProps> = ({ variant, ...props })
|
|||
const activeOneClickProviders = activeProviders.filter(entry => !INTERACTIVE_LOGIN_METHODS.includes(entry))
|
||||
|
||||
if (activeProviders.length === 1 && activeOneClickProviders.length === 1) {
|
||||
return `${ getApiUrl() }/auth/${ activeOneClickProviders[0] }`
|
||||
return `${ getApiUrl() }auth/${ activeOneClickProviders[0] }`
|
||||
}
|
||||
return '/login'
|
||||
}, [authProviders])
|
||||
|
|
|
@ -63,7 +63,7 @@ export const ProfileAccountManagement: React.FC = () => {
|
|||
<Card className="bg-dark mb-4">
|
||||
<Card.Body>
|
||||
<Card.Title><Trans i18nKey="profile.accountManagement"/></Card.Title>
|
||||
<Button variant="secondary" block href={ getApiUrl() + '/me/export' } className="mb-2">
|
||||
<Button variant="secondary" block href={ getApiUrl() + 'me/export' } className="mb-2">
|
||||
<ForkAwesomeIcon icon="cloud-download" fixedWidth={ true } className="mx-2"/>
|
||||
<Trans i18nKey="profile.exportUserData"/>
|
||||
</Button>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue