Merge branch 'master' into merge-1979-with-1923

This commit is contained in:
Moriz Wahl 2022-06-15 16:17:15 +02:00 committed by GitHub
commit e550d7ebbf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 18 additions and 11 deletions

View File

@ -1,4 +1,4 @@
CONFIG_VERSION=v6.2022-04-21 CONFIG_VERSION=v7.2022-06-15
# Server # Server
PORT=4000 PORT=4000
@ -28,6 +28,7 @@ COMMUNITY_NAME=Gradido Entwicklung
COMMUNITY_URL=http://localhost/ COMMUNITY_URL=http://localhost/
COMMUNITY_REGISTER_URL=http://localhost/register COMMUNITY_REGISTER_URL=http://localhost/register
COMMUNITY_REDEEM_URL=http://localhost/redeem/{code} COMMUNITY_REDEEM_URL=http://localhost/redeem/{code}
COMMUNITY_REDEEM_CONTRIBUTION_URL=http://localhost/redeem/CL-{code}
COMMUNITY_DESCRIPTION=Die lokale Entwicklungsumgebung von Gradido. COMMUNITY_DESCRIPTION=Die lokale Entwicklungsumgebung von Gradido.
# Login Server # Login Server

View File

@ -27,6 +27,7 @@ COMMUNITY_NAME=$COMMUNITY_NAME
COMMUNITY_URL=$COMMUNITY_URL COMMUNITY_URL=$COMMUNITY_URL
COMMUNITY_REGISTER_URL=$COMMUNITY_REGISTER_URL COMMUNITY_REGISTER_URL=$COMMUNITY_REGISTER_URL
COMMUNITY_REDEEM_URL=$COMMUNITY_REDEEM_URL COMMUNITY_REDEEM_URL=$COMMUNITY_REDEEM_URL
COMMUNITY_REDEEM_CONTRIBUTION_URL=$COMMUNITY_REDEEM_CONTRIBUTION_URL
COMMUNITY_DESCRIPTION=$COMMUNITY_DESCRIPTION COMMUNITY_DESCRIPTION=$COMMUNITY_DESCRIPTION
# Login Server # Login Server

View File

@ -17,7 +17,7 @@ const constants = {
LOG_LEVEL: process.env.LOG_LEVEL || 'info', LOG_LEVEL: process.env.LOG_LEVEL || 'info',
CONFIG_VERSION: { CONFIG_VERSION: {
DEFAULT: 'DEFAULT', DEFAULT: 'DEFAULT',
EXPECTED: 'v6.2022-04-21', EXPECTED: 'v7.2022-06-15',
CURRENT: '', CURRENT: '',
}, },
} }
@ -54,6 +54,8 @@ const community = {
COMMUNITY_URL: process.env.COMMUNITY_URL || 'http://localhost/', COMMUNITY_URL: process.env.COMMUNITY_URL || 'http://localhost/',
COMMUNITY_REGISTER_URL: process.env.COMMUNITY_REGISTER_URL || 'http://localhost/register', COMMUNITY_REGISTER_URL: process.env.COMMUNITY_REGISTER_URL || 'http://localhost/register',
COMMUNITY_REDEEM_URL: process.env.COMMUNITY_REDEEM_URL || 'http://localhost/redeem/{code}', COMMUNITY_REDEEM_URL: process.env.COMMUNITY_REDEEM_URL || 'http://localhost/redeem/{code}',
COMMUNITY_REDEEM_CONTRIBUTION_URL:
process.env.COMMUNITY_REDEEM_CONTRIBUTION_URL || 'http://localhost/redeem/CL-{code}',
COMMUNITY_DESCRIPTION: COMMUNITY_DESCRIPTION:
process.env.COMMUNITY_DESCRIPTION || 'Die lokale Entwicklungsumgebung von Gradido.', process.env.COMMUNITY_DESCRIPTION || 'Die lokale Entwicklungsumgebung von Gradido.',
} }

View File

@ -17,8 +17,8 @@ export class ContributionLink {
this.maxAmountPerMonth = contributionLink.maxAmountPerMonth this.maxAmountPerMonth = contributionLink.maxAmountPerMonth
this.cycle = contributionLink.cycle this.cycle = contributionLink.cycle
this.maxPerCycle = contributionLink.maxPerCycle this.maxPerCycle = contributionLink.maxPerCycle
this.code = 'CL-' + contributionLink.code this.code = contributionLink.code
this.link = CONFIG.COMMUNITY_REDEEM_URL.replace(/{code}/g, this.code) this.link = CONFIG.COMMUNITY_REDEEM_CONTRIBUTION_URL.replace(/{code}/g, this.code)
} }
@Field(() => Number) @Field(() => Number)

View File

@ -1755,9 +1755,10 @@ describe('AdminResolver', () => {
expect.objectContaining({ expect.objectContaining({
data: { data: {
createContributionLink: expect.objectContaining({ createContributionLink: expect.objectContaining({
id: expect.any(Number),
amount: '200', amount: '200',
code: expect.stringMatching(/^CL-[0-9a-f]{24,24}$/), code: expect.stringMatching(/^[0-9a-f]{24,24}$/),
link: expect.any(String), link: expect.stringMatching(/^.*?\/CL-[0-9a-f]{24,24}$/),
createdAt: expect.any(String), createdAt: expect.any(String),
name: 'Dokumenta 2022', name: 'Dokumenta 2022',
memo: 'Danke für deine Teilnahme an der Dokumenta 2022', memo: 'Danke für deine Teilnahme an der Dokumenta 2022',
@ -1808,8 +1809,8 @@ describe('AdminResolver', () => {
links: expect.arrayContaining([ links: expect.arrayContaining([
expect.objectContaining({ expect.objectContaining({
amount: '200', amount: '200',
code: expect.stringMatching(/^CL-[0-9a-f]{24,24}$/), code: expect.stringMatching(/^[0-9a-f]{24,24}$/),
link: expect.any(String), link: expect.stringMatching(/^.*?\/CL-[0-9a-f]{24,24}$/),
createdAt: expect.any(String), createdAt: expect.any(String),
name: 'Dokumenta 2022', name: 'Dokumenta 2022',
memo: 'Danke für deine Teilnahme an der Dokumenta 2022', memo: 'Danke für deine Teilnahme an der Dokumenta 2022',
@ -1876,8 +1877,8 @@ describe('AdminResolver', () => {
updateContributionLink: { updateContributionLink: {
id: linkId, id: linkId,
amount: '400', amount: '400',
code: expect.stringMatching(/^CL-[0-9a-f]{24,24}$/), code: expect.stringMatching(/^[0-9a-f]{24,24}$/),
link: expect.any(String), link: expect.stringMatching(/^.*?\/CL-[0-9a-f]{24,24}$/),
createdAt: expect.any(String), createdAt: expect.any(String),
name: 'Dokumenta 2023', name: 'Dokumenta 2023',
memo: 'Danke für deine Teilnahme an der Dokumenta 2023', memo: 'Danke für deine Teilnahme an der Dokumenta 2023',

View File

@ -159,6 +159,7 @@ export const createContributionLink = gql`
maxAmountPerMonth: $maxAmountPerMonth maxAmountPerMonth: $maxAmountPerMonth
maxPerCycle: $maxPerCycle maxPerCycle: $maxPerCycle
) { ) {
id
amount amount
name name
memo memo

View File

@ -22,10 +22,11 @@ COMMUNITY_NAME="Gradido Development Stage1"
COMMUNITY_URL=https://stage1.gradido.net/ COMMUNITY_URL=https://stage1.gradido.net/
COMMUNITY_REGISTER_URL=https://stage1.gradido.net/register COMMUNITY_REGISTER_URL=https://stage1.gradido.net/register
COMMUNITY_REDEEM_URL=https://stage1.gradido.net/redeem/{code} COMMUNITY_REDEEM_URL=https://stage1.gradido.net/redeem/{code}
COMMUNITY_REDEEM_CONTRIBUTION_URL=https://stage1.gradido.net/redeem/CL-{code}
COMMUNITY_DESCRIPTION="Gradido Development Stage1 Test Community" COMMUNITY_DESCRIPTION="Gradido Development Stage1 Test Community"
# backend # backend
BACKEND_CONFIG_VERSION=v6.2022-04-21 BACKEND_CONFIG_VERSION=v7.2022-06-15
JWT_EXPIRES_IN=30m JWT_EXPIRES_IN=30m
GDT_API_URL=https://gdt.gradido.net GDT_API_URL=https://gdt.gradido.net