Merge pull request #968 from gradido/community-production

refactor: In Production only Show one Community
This commit is contained in:
Moriz Wahl 2021-10-14 14:56:48 +02:00 committed by GitHub
commit e58c5726cb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 5 deletions

View File

@ -11,6 +11,7 @@ const server = {
LOGIN_API_URL: process.env.LOGIN_API_URL || 'http://login-server:1201/',
COMMUNITY_API_URL: process.env.COMMUNITY_API_URL || 'http://nginx/api/',
GDT_API_URL: process.env.GDT_API_URL || 'https://gdt.gradido.net',
PRODUCTION: process.env.NODE_ENV === 'production' || false,
}
const database = {

View File

@ -19,9 +19,17 @@ export class CommunityResolver {
@Query(() => [Community])
async communities(): Promise<Community[]> {
const communities: Community[] = []
communities.push(
if (CONFIG.PRODUCTION)
return [
new Community({
id: 3,
name: 'Gradido-Akademie',
description: 'Freies Institut für Wirtschaftsbionik.',
url: 'https://gradido.net',
registerUrl: 'https://gdd1.gradido.com/vue/register-community',
}),
]
return [
new Community({
id: 1,
name: 'Gradido Entwicklung',
@ -43,7 +51,6 @@ export class CommunityResolver {
url: 'https://gradido.net',
registerUrl: 'https://gdd1.gradido.com/vue/register-community',
}),
)
return communities
]
}
}