mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
solution to enable import/no-cycle
This commit is contained in:
parent
90c9802ece
commit
28cbf13062
@ -55,7 +55,7 @@ module.exports = {
|
||||
'import/named': 'error',
|
||||
'import/namespace': 'error',
|
||||
'import/no-absolute-path': 'error',
|
||||
'import/no-cycle': 'off',
|
||||
'import/no-cycle': 'error',
|
||||
'import/no-dynamic-require': 'error',
|
||||
'import/no-internal-modules': 'off',
|
||||
'import/no-relative-packages': 'error',
|
||||
|
||||
@ -2,7 +2,8 @@ import { Decimal } from 'decimal.js-light'
|
||||
import { User as DbUser } from '@entity/User'
|
||||
import { Contribution as DbContribution } from '@entity/Contribution'
|
||||
import { Event as DbEvent } from '@entity/Event'
|
||||
import { Event, EventType } from './Event'
|
||||
import { Event } from './Event'
|
||||
import { EventType } from './EventType'
|
||||
|
||||
export const EVENT_ADMIN_CONTRIBUTION_CONFIRM = async (
|
||||
user: DbUser,
|
||||
|
||||
@ -2,7 +2,8 @@ import { Decimal } from 'decimal.js-light'
|
||||
import { User as DbUser } from '@entity/User'
|
||||
import { Contribution as DbContribution } from '@entity/Contribution'
|
||||
import { Event as DbEvent } from '@entity/Event'
|
||||
import { Event, EventType } from './Event'
|
||||
import { Event } from './Event'
|
||||
import { EventType } from './EventType'
|
||||
|
||||
export const EVENT_ADMIN_CONTRIBUTION_CREATE = async (
|
||||
user: DbUser,
|
||||
|
||||
@ -2,7 +2,8 @@ import { Decimal } from 'decimal.js-light'
|
||||
import { User as DbUser } from '@entity/User'
|
||||
import { Contribution as DbContribution } from '@entity/Contribution'
|
||||
import { Event as DbEvent } from '@entity/Event'
|
||||
import { Event, EventType } from './Event'
|
||||
import { Event } from './Event'
|
||||
import { EventType } from './EventType'
|
||||
|
||||
export const EVENT_ADMIN_CONTRIBUTION_DELETE = async (
|
||||
user: DbUser,
|
||||
|
||||
@ -2,7 +2,8 @@ import { Decimal } from 'decimal.js-light'
|
||||
import { User as DbUser } from '@entity/User'
|
||||
import { Contribution as DbContribution } from '@entity/Contribution'
|
||||
import { Event as DbEvent } from '@entity/Event'
|
||||
import { Event, EventType } from './Event'
|
||||
import { Event } from './Event'
|
||||
import { EventType } from './EventType'
|
||||
|
||||
export const EVENT_ADMIN_CONTRIBUTION_DENY = async (
|
||||
user: DbUser,
|
||||
|
||||
@ -2,7 +2,8 @@ import { Decimal } from 'decimal.js-light'
|
||||
import { User as DbUser } from '@entity/User'
|
||||
import { ContributionLink as DbContributionLink } from '@entity/ContributionLink'
|
||||
import { Event as DbEvent } from '@entity/Event'
|
||||
import { Event, EventType } from './Event'
|
||||
import { Event } from './Event'
|
||||
import { EventType } from './EventType'
|
||||
|
||||
export const EVENT_ADMIN_CONTRIBUTION_LINK_CREATE = async (
|
||||
moderator: DbUser,
|
||||
|
||||
@ -1,7 +1,8 @@
|
||||
import { User as DbUser } from '@entity/User'
|
||||
import { ContributionLink as DbContributionLink } from '@entity/ContributionLink'
|
||||
import { Event as DbEvent } from '@entity/Event'
|
||||
import { Event, EventType } from './Event'
|
||||
import { Event } from './Event'
|
||||
import { EventType } from './EventType'
|
||||
|
||||
export const EVENT_ADMIN_CONTRIBUTION_LINK_DELETE = async (
|
||||
moderator: DbUser,
|
||||
|
||||
@ -2,7 +2,8 @@ import { Decimal } from 'decimal.js-light'
|
||||
import { User as DbUser } from '@entity/User'
|
||||
import { ContributionLink as DbContributionLink } from '@entity/ContributionLink'
|
||||
import { Event as DbEvent } from '@entity/Event'
|
||||
import { Event, EventType } from './Event'
|
||||
import { Event } from './Event'
|
||||
import { EventType } from './EventType'
|
||||
|
||||
export const EVENT_ADMIN_CONTRIBUTION_LINK_UPDATE = async (
|
||||
moderator: DbUser,
|
||||
|
||||
@ -2,7 +2,8 @@ import { User as DbUser } from '@entity/User'
|
||||
import { Contribution as DbContribution } from '@entity/Contribution'
|
||||
import { ContributionMessage as DbContributionMessage } from '@entity/ContributionMessage'
|
||||
import { Event as DbEvent } from '@entity/Event'
|
||||
import { Event, EventType } from './Event'
|
||||
import { Event } from './Event'
|
||||
import { EventType } from './EventType'
|
||||
|
||||
export const EVENT_ADMIN_CONTRIBUTION_MESSAGE_CREATE = async (
|
||||
user: DbUser,
|
||||
|
||||
@ -2,7 +2,8 @@ import { Decimal } from 'decimal.js-light'
|
||||
import { User as DbUser } from '@entity/User'
|
||||
import { Contribution as DbContribution } from '@entity/Contribution'
|
||||
import { Event as DbEvent } from '@entity/Event'
|
||||
import { Event, EventType } from './Event'
|
||||
import { Event } from './Event'
|
||||
import { EventType } from './EventType'
|
||||
|
||||
export const EVENT_ADMIN_CONTRIBUTION_UPDATE = async (
|
||||
user: DbUser,
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
import { User as DbUser } from '@entity/User'
|
||||
import { Event as DbEvent } from '@entity/Event'
|
||||
import { Event, EventType } from './Event'
|
||||
import { Event } from './Event'
|
||||
import { EventType } from './EventType'
|
||||
|
||||
export const EVENT_ADMIN_USER_DELETE = async (user: DbUser, moderator: DbUser): Promise<DbEvent> =>
|
||||
Event(EventType.ADMIN_USER_DELETE, user, moderator).save()
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
import { User as DbUser } from '@entity/User'
|
||||
import { Event as DbEvent } from '@entity/Event'
|
||||
import { Event, EventType } from './Event'
|
||||
import { Event } from './Event'
|
||||
import { EventType } from './EventType'
|
||||
|
||||
export const EVENT_ADMIN_USER_ROLE_SET = async (
|
||||
user: DbUser,
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
import { User as DbUser } from '@entity/User'
|
||||
import { Event as DbEvent } from '@entity/Event'
|
||||
import { Event, EventType } from './Event'
|
||||
import { Event } from './Event'
|
||||
import { EventType } from './EventType'
|
||||
|
||||
export const EVENT_ADMIN_USER_UNDELETE = async (
|
||||
user: DbUser,
|
||||
|
||||
@ -2,7 +2,8 @@ import { Decimal } from 'decimal.js-light'
|
||||
import { User as DbUser } from '@entity/User'
|
||||
import { Contribution as DbContribution } from '@entity/Contribution'
|
||||
import { Event as DbEvent } from '@entity/Event'
|
||||
import { Event, EventType } from './Event'
|
||||
import { Event } from './Event'
|
||||
import { EventType } from './EventType'
|
||||
|
||||
export const EVENT_CONTRIBUTION_CREATE = async (
|
||||
user: DbUser,
|
||||
|
||||
@ -2,7 +2,8 @@ import { Decimal } from 'decimal.js-light'
|
||||
import { User as DbUser } from '@entity/User'
|
||||
import { Contribution as DbContribution } from '@entity/Contribution'
|
||||
import { Event as DbEvent } from '@entity/Event'
|
||||
import { Event, EventType } from './Event'
|
||||
import { Event } from './Event'
|
||||
import { EventType } from './EventType'
|
||||
|
||||
export const EVENT_CONTRIBUTION_DELETE = async (
|
||||
user: DbUser,
|
||||
|
||||
@ -4,7 +4,8 @@ import { Transaction as DbTransaction } from '@entity/Transaction'
|
||||
import { Contribution as DbContribution } from '@entity/Contribution'
|
||||
import { ContributionLink as DbContributionLink } from '@entity/ContributionLink'
|
||||
import { Event as DbEvent } from '@entity/Event'
|
||||
import { Event, EventType } from './Event'
|
||||
import { Event } from './Event'
|
||||
import { EventType } from './EventType'
|
||||
|
||||
export const EVENT_CONTRIBUTION_LINK_REDEEM = async (
|
||||
user: DbUser,
|
||||
|
||||
@ -2,7 +2,8 @@ import { User as DbUser } from '@entity/User'
|
||||
import { Contribution as DbContribution } from '@entity/Contribution'
|
||||
import { ContributionMessage as DbContributionMessage } from '@entity/ContributionMessage'
|
||||
import { Event as DbEvent } from '@entity/Event'
|
||||
import { Event, EventType } from './Event'
|
||||
import { Event } from './Event'
|
||||
import { EventType } from './EventType'
|
||||
|
||||
export const EVENT_CONTRIBUTION_MESSAGE_CREATE = async (
|
||||
user: DbUser,
|
||||
|
||||
@ -2,7 +2,8 @@ import { Decimal } from 'decimal.js-light'
|
||||
import { User as DbUser } from '@entity/User'
|
||||
import { Contribution as DbContribution } from '@entity/Contribution'
|
||||
import { Event as DbEvent } from '@entity/Event'
|
||||
import { Event, EventType } from './Event'
|
||||
import { Event } from './Event'
|
||||
import { EventType } from './EventType'
|
||||
|
||||
export const EVENT_CONTRIBUTION_UPDATE = async (
|
||||
user: DbUser,
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
import { User as DbUser } from '@entity/User'
|
||||
import { Event as DbEvent } from '@entity/Event'
|
||||
import { Event, EventType } from './Event'
|
||||
import { Event } from './Event'
|
||||
import { EventType } from './EventType'
|
||||
|
||||
export const EVENT_EMAIL_ACCOUNT_MULTIREGISTRATION = async (user: DbUser): Promise<DbEvent> =>
|
||||
Event(EventType.EMAIL_ACCOUNT_MULTIREGISTRATION, user, { id: 0 } as DbUser).save()
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
import { User as DbUser } from '@entity/User'
|
||||
import { Event as DbEvent } from '@entity/Event'
|
||||
import { Event, EventType } from './Event'
|
||||
import { Event } from './Event'
|
||||
import { EventType } from './EventType'
|
||||
|
||||
export const EVENT_EMAIL_ADMIN_CONFIRMATION = async (
|
||||
user: DbUser,
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
import { User as DbUser } from '@entity/User'
|
||||
import { Event as DbEvent } from '@entity/Event'
|
||||
import { Event, EventType } from './Event'
|
||||
import { Event } from './Event'
|
||||
import { EventType } from './EventType'
|
||||
|
||||
export const EVENT_EMAIL_CONFIRMATION = async (user: DbUser): Promise<DbEvent> =>
|
||||
Event(EventType.EMAIL_CONFIRMATION, user, user).save()
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
import { User as DbUser } from '@entity/User'
|
||||
import { Event as DbEvent } from '@entity/Event'
|
||||
import { Event, EventType } from './Event'
|
||||
import { Event } from './Event'
|
||||
import { EventType } from './EventType'
|
||||
|
||||
export const EVENT_EMAIL_FORGOT_PASSWORD = async (user: DbUser): Promise<DbEvent> =>
|
||||
Event(EventType.EMAIL_FORGOT_PASSWORD, user, { id: 0 } as DbUser).save()
|
||||
|
||||
@ -2,7 +2,8 @@ import { Decimal } from 'decimal.js-light'
|
||||
import { User as DbUser } from '@entity/User'
|
||||
import { TransactionLink as DbTransactionLink } from '@entity/TransactionLink'
|
||||
import { Event as DbEvent } from '@entity/Event'
|
||||
import { Event, EventType } from './Event'
|
||||
import { Event } from './Event'
|
||||
import { EventType } from './EventType'
|
||||
|
||||
export const EVENT_TRANSACTION_LINK_CREATE = async (
|
||||
user: DbUser,
|
||||
|
||||
@ -1,7 +1,8 @@
|
||||
import { User as DbUser } from '@entity/User'
|
||||
import { TransactionLink as DbTransactionLink } from '@entity/TransactionLink'
|
||||
import { Event as DbEvent } from '@entity/Event'
|
||||
import { Event, EventType } from './Event'
|
||||
import { Event } from './Event'
|
||||
import { EventType } from './EventType'
|
||||
|
||||
export const EVENT_TRANSACTION_LINK_DELETE = async (
|
||||
user: DbUser,
|
||||
|
||||
@ -2,7 +2,8 @@ import { Decimal } from 'decimal.js-light'
|
||||
import { User as DbUser } from '@entity/User'
|
||||
import { TransactionLink as DbTransactionLink } from '@entity/TransactionLink'
|
||||
import { Event as DbEvent } from '@entity/Event'
|
||||
import { Event, EventType } from './Event'
|
||||
import { Event } from './Event'
|
||||
import { EventType } from './EventType'
|
||||
|
||||
export const EVENT_TRANSACTION_LINK_REDEEM = async (
|
||||
user: DbUser,
|
||||
|
||||
@ -2,7 +2,8 @@ import { Decimal } from 'decimal.js-light'
|
||||
import { User as DbUser } from '@entity/User'
|
||||
import { Transaction as DbTransaction } from '@entity/Transaction'
|
||||
import { Event as DbEvent } from '@entity/Event'
|
||||
import { Event, EventType } from './Event'
|
||||
import { Event } from './Event'
|
||||
import { EventType } from './EventType'
|
||||
|
||||
export const EVENT_TRANSACTION_RECEIVE = async (
|
||||
user: DbUser,
|
||||
|
||||
@ -2,7 +2,8 @@ import { Decimal } from 'decimal.js-light'
|
||||
import { User as DbUser } from '@entity/User'
|
||||
import { Transaction as DbTransaction } from '@entity/Transaction'
|
||||
import { Event as DbEvent } from '@entity/Event'
|
||||
import { Event, EventType } from './Event'
|
||||
import { Event } from './Event'
|
||||
import { EventType } from './EventType'
|
||||
|
||||
export const EVENT_TRANSACTION_SEND = async (
|
||||
user: DbUser,
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
import { User as DbUser } from '@entity/User'
|
||||
import { Event as DbEvent } from '@entity/Event'
|
||||
import { Event, EventType } from './Event'
|
||||
import { Event } from './Event'
|
||||
import { EventType } from './EventType'
|
||||
|
||||
export const EVENT_USER_ACTIVATE_ACCOUNT = async (user: DbUser): Promise<DbEvent> =>
|
||||
Event(EventType.USER_ACTIVATE_ACCOUNT, user, user).save()
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
import { User as DbUser } from '@entity/User'
|
||||
import { Event as DbEvent } from '@entity/Event'
|
||||
import { Event, EventType } from './Event'
|
||||
import { Event } from './Event'
|
||||
import { EventType } from './EventType'
|
||||
|
||||
export const EVENT_USER_INFO_UPDATE = async (user: DbUser): Promise<DbEvent> =>
|
||||
Event(EventType.USER_INFO_UPDATE, user, user).save()
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
import { User as DbUser } from '@entity/User'
|
||||
import { Event as DbEvent } from '@entity/Event'
|
||||
import { Event, EventType } from './Event'
|
||||
import { Event } from './Event'
|
||||
import { EventType } from './EventType'
|
||||
|
||||
export const EVENT_USER_LOGIN = async (user: DbUser): Promise<DbEvent> =>
|
||||
Event(EventType.USER_LOGIN, user, user).save()
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
import { User as DbUser } from '@entity/User'
|
||||
import { Event as DbEvent } from '@entity/Event'
|
||||
import { Event, EventType } from './Event'
|
||||
import { Event } from './Event'
|
||||
import { EventType } from './EventType'
|
||||
|
||||
export const EVENT_USER_LOGOUT = async (user: DbUser): Promise<DbEvent> =>
|
||||
Event(EventType.USER_LOGOUT, user, user).save()
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
import { User as DbUser } from '@entity/User'
|
||||
import { Event as DbEvent } from '@entity/Event'
|
||||
import { Event, EventType } from './Event'
|
||||
import { Event } from './Event'
|
||||
import { EventType } from './EventType'
|
||||
|
||||
export const EVENT_USER_REGISTER = async (user: DbUser): Promise<DbEvent> =>
|
||||
Event(EventType.USER_REGISTER, user, user).save()
|
||||
|
||||
@ -33,37 +33,3 @@ export const Event = (
|
||||
event.amount = amount
|
||||
return event
|
||||
}
|
||||
|
||||
export { EventType }
|
||||
|
||||
export { EVENT_ADMIN_CONTRIBUTION_CONFIRM } from './EVENT_ADMIN_CONTRIBUTION_CONFIRM'
|
||||
export { EVENT_ADMIN_CONTRIBUTION_CREATE } from './EVENT_ADMIN_CONTRIBUTION_CREATE'
|
||||
export { EVENT_ADMIN_CONTRIBUTION_DELETE } from './EVENT_ADMIN_CONTRIBUTION_DELETE'
|
||||
export { EVENT_ADMIN_CONTRIBUTION_DENY } from './EVENT_ADMIN_CONTRIBUTION_DENY'
|
||||
export { EVENT_ADMIN_CONTRIBUTION_UPDATE } from './EVENT_ADMIN_CONTRIBUTION_UPDATE'
|
||||
export { EVENT_ADMIN_CONTRIBUTION_LINK_CREATE } from './EVENT_ADMIN_CONTRIBUTION_LINK_CREATE'
|
||||
export { EVENT_ADMIN_CONTRIBUTION_LINK_DELETE } from './EVENT_ADMIN_CONTRIBUTION_LINK_DELETE'
|
||||
export { EVENT_ADMIN_CONTRIBUTION_LINK_UPDATE } from './EVENT_ADMIN_CONTRIBUTION_LINK_UPDATE'
|
||||
export { EVENT_ADMIN_CONTRIBUTION_MESSAGE_CREATE } from './EVENT_ADMIN_CONTRIBUTION_MESSAGE_CREATE'
|
||||
export { EVENT_ADMIN_USER_DELETE } from './EVENT_ADMIN_USER_DELETE'
|
||||
export { EVENT_ADMIN_USER_UNDELETE } from './EVENT_ADMIN_USER_UNDELETE'
|
||||
export { EVENT_ADMIN_USER_ROLE_SET } from './EVENT_ADMIN_USER_ROLE_SET'
|
||||
export { EVENT_CONTRIBUTION_CREATE } from './EVENT_CONTRIBUTION_CREATE'
|
||||
export { EVENT_CONTRIBUTION_DELETE } from './EVENT_CONTRIBUTION_DELETE'
|
||||
export { EVENT_CONTRIBUTION_UPDATE } from './EVENT_CONTRIBUTION_UPDATE'
|
||||
export { EVENT_CONTRIBUTION_MESSAGE_CREATE } from './EVENT_CONTRIBUTION_MESSAGE_CREATE'
|
||||
export { EVENT_CONTRIBUTION_LINK_REDEEM } from './EVENT_CONTRIBUTION_LINK_REDEEM'
|
||||
export { EVENT_EMAIL_ACCOUNT_MULTIREGISTRATION } from './EVENT_EMAIL_ACCOUNT_MULTIREGISTRATION'
|
||||
export { EVENT_EMAIL_ADMIN_CONFIRMATION } from './EVENT_EMAIL_ADMIN_CONFIRMATION'
|
||||
export { EVENT_EMAIL_CONFIRMATION } from './EVENT_EMAIL_CONFIRMATION'
|
||||
export { EVENT_EMAIL_FORGOT_PASSWORD } from './EVENT_EMAIL_FORGOT_PASSWORD'
|
||||
export { EVENT_TRANSACTION_SEND } from './EVENT_TRANSACTION_SEND'
|
||||
export { EVENT_TRANSACTION_RECEIVE } from './EVENT_TRANSACTION_RECEIVE'
|
||||
export { EVENT_TRANSACTION_LINK_CREATE } from './EVENT_TRANSACTION_LINK_CREATE'
|
||||
export { EVENT_TRANSACTION_LINK_DELETE } from './EVENT_TRANSACTION_LINK_DELETE'
|
||||
export { EVENT_TRANSACTION_LINK_REDEEM } from './EVENT_TRANSACTION_LINK_REDEEM'
|
||||
export { EVENT_USER_ACTIVATE_ACCOUNT } from './EVENT_USER_ACTIVATE_ACCOUNT'
|
||||
export { EVENT_USER_INFO_UPDATE } from './EVENT_USER_INFO_UPDATE'
|
||||
export { EVENT_USER_LOGIN } from './EVENT_USER_LOGIN'
|
||||
export { EVENT_USER_LOGOUT } from './EVENT_USER_LOGOUT'
|
||||
export { EVENT_USER_REGISTER } from './EVENT_USER_REGISTER'
|
||||
|
||||
33
backend/src/event/Events.ts
Normal file
33
backend/src/event/Events.ts
Normal file
@ -0,0 +1,33 @@
|
||||
export { EventType } from './EventType'
|
||||
export { Event } from './Event'
|
||||
export { EVENT_ADMIN_CONTRIBUTION_CONFIRM } from './EVENT_ADMIN_CONTRIBUTION_CONFIRM'
|
||||
export { EVENT_ADMIN_CONTRIBUTION_CREATE } from './EVENT_ADMIN_CONTRIBUTION_CREATE'
|
||||
export { EVENT_ADMIN_CONTRIBUTION_DELETE } from './EVENT_ADMIN_CONTRIBUTION_DELETE'
|
||||
export { EVENT_ADMIN_CONTRIBUTION_DENY } from './EVENT_ADMIN_CONTRIBUTION_DENY'
|
||||
export { EVENT_ADMIN_CONTRIBUTION_UPDATE } from './EVENT_ADMIN_CONTRIBUTION_UPDATE'
|
||||
export { EVENT_ADMIN_CONTRIBUTION_LINK_CREATE } from './EVENT_ADMIN_CONTRIBUTION_LINK_CREATE'
|
||||
export { EVENT_ADMIN_CONTRIBUTION_LINK_DELETE } from './EVENT_ADMIN_CONTRIBUTION_LINK_DELETE'
|
||||
export { EVENT_ADMIN_CONTRIBUTION_LINK_UPDATE } from './EVENT_ADMIN_CONTRIBUTION_LINK_UPDATE'
|
||||
export { EVENT_ADMIN_CONTRIBUTION_MESSAGE_CREATE } from './EVENT_ADMIN_CONTRIBUTION_MESSAGE_CREATE'
|
||||
export { EVENT_ADMIN_USER_DELETE } from './EVENT_ADMIN_USER_DELETE'
|
||||
export { EVENT_ADMIN_USER_UNDELETE } from './EVENT_ADMIN_USER_UNDELETE'
|
||||
export { EVENT_ADMIN_USER_ROLE_SET } from './EVENT_ADMIN_USER_ROLE_SET'
|
||||
export { EVENT_CONTRIBUTION_CREATE } from './EVENT_CONTRIBUTION_CREATE'
|
||||
export { EVENT_CONTRIBUTION_DELETE } from './EVENT_CONTRIBUTION_DELETE'
|
||||
export { EVENT_CONTRIBUTION_UPDATE } from './EVENT_CONTRIBUTION_UPDATE'
|
||||
export { EVENT_CONTRIBUTION_MESSAGE_CREATE } from './EVENT_CONTRIBUTION_MESSAGE_CREATE'
|
||||
export { EVENT_CONTRIBUTION_LINK_REDEEM } from './EVENT_CONTRIBUTION_LINK_REDEEM'
|
||||
export { EVENT_EMAIL_ACCOUNT_MULTIREGISTRATION } from './EVENT_EMAIL_ACCOUNT_MULTIREGISTRATION'
|
||||
export { EVENT_EMAIL_ADMIN_CONFIRMATION } from './EVENT_EMAIL_ADMIN_CONFIRMATION'
|
||||
export { EVENT_EMAIL_CONFIRMATION } from './EVENT_EMAIL_CONFIRMATION'
|
||||
export { EVENT_EMAIL_FORGOT_PASSWORD } from './EVENT_EMAIL_FORGOT_PASSWORD'
|
||||
export { EVENT_TRANSACTION_SEND } from './EVENT_TRANSACTION_SEND'
|
||||
export { EVENT_TRANSACTION_RECEIVE } from './EVENT_TRANSACTION_RECEIVE'
|
||||
export { EVENT_TRANSACTION_LINK_CREATE } from './EVENT_TRANSACTION_LINK_CREATE'
|
||||
export { EVENT_TRANSACTION_LINK_DELETE } from './EVENT_TRANSACTION_LINK_DELETE'
|
||||
export { EVENT_TRANSACTION_LINK_REDEEM } from './EVENT_TRANSACTION_LINK_REDEEM'
|
||||
export { EVENT_USER_ACTIVATE_ACCOUNT } from './EVENT_USER_ACTIVATE_ACCOUNT'
|
||||
export { EVENT_USER_INFO_UPDATE } from './EVENT_USER_INFO_UPDATE'
|
||||
export { EVENT_USER_LOGIN } from './EVENT_USER_LOGIN'
|
||||
export { EVENT_USER_LOGOUT } from './EVENT_USER_LOGOUT'
|
||||
export { EVENT_USER_REGISTER } from './EVENT_USER_REGISTER'
|
||||
@ -20,7 +20,7 @@ import { cleanDB, testEnvironment, resetToken } from '@test/helpers'
|
||||
import { bibiBloxberg } from '@/seeds/users/bibi-bloxberg'
|
||||
import { peterLustig } from '@/seeds/users/peter-lustig'
|
||||
import { userFactory } from '@/seeds/factory/user'
|
||||
import { EventType } from '@/event/Event'
|
||||
import { EventType } from '@/event/Events'
|
||||
|
||||
let mutate: any, query: any, con: any
|
||||
let testEnv: any
|
||||
|
||||
@ -25,7 +25,7 @@ import {
|
||||
EVENT_ADMIN_CONTRIBUTION_LINK_CREATE,
|
||||
EVENT_ADMIN_CONTRIBUTION_LINK_DELETE,
|
||||
EVENT_ADMIN_CONTRIBUTION_LINK_UPDATE,
|
||||
} from '@/event/Event'
|
||||
} from '@/event/Events'
|
||||
|
||||
@Resolver()
|
||||
export class ContributionLinkResolver {
|
||||
|
||||
@ -21,7 +21,7 @@ import { userFactory } from '@/seeds/factory/user'
|
||||
import { bibiBloxberg } from '@/seeds/users/bibi-bloxberg'
|
||||
import { peterLustig } from '@/seeds/users/peter-lustig'
|
||||
import { sendAddedContributionMessageEmail } from '@/emails/sendEmailVariants'
|
||||
import { EventType } from '@/event/Event'
|
||||
import { EventType } from '@/event/Events'
|
||||
|
||||
jest.mock('@/emails/sendEmailVariants', () => {
|
||||
const originalModule = jest.requireActual('@/emails/sendEmailVariants')
|
||||
|
||||
@ -21,7 +21,7 @@ import LogError from '@/server/LogError'
|
||||
import {
|
||||
EVENT_ADMIN_CONTRIBUTION_MESSAGE_CREATE,
|
||||
EVENT_CONTRIBUTION_MESSAGE_CREATE,
|
||||
} from '@/event/Event'
|
||||
} from '@/event/Events'
|
||||
|
||||
@Resolver()
|
||||
export class ContributionMessageResolver {
|
||||
|
||||
@ -51,7 +51,7 @@ import { userFactory } from '@/seeds/factory/user'
|
||||
import { creationFactory } from '@/seeds/factory/creation'
|
||||
import { creations } from '@/seeds/creation/index'
|
||||
import { peterLustig } from '@/seeds/users/peter-lustig'
|
||||
import { EventType } from '@/event/Event'
|
||||
import { EventType } from '@/event/Events'
|
||||
import { logger, i18n as localization } from '@test/testSetup'
|
||||
import { raeuberHotzenplotz } from '@/seeds/users/raeuber-hotzenplotz'
|
||||
import { UnconfirmedContribution } from '@model/UnconfirmedContribution'
|
||||
|
||||
@ -46,7 +46,7 @@ import {
|
||||
EVENT_ADMIN_CONTRIBUTION_DELETE,
|
||||
EVENT_ADMIN_CONTRIBUTION_CONFIRM,
|
||||
EVENT_ADMIN_CONTRIBUTION_DENY,
|
||||
} from '@/event/Event'
|
||||
} from '@/event/Events'
|
||||
import { calculateDecay } from '@/util/decay'
|
||||
import {
|
||||
sendContributionConfirmedEmail,
|
||||
|
||||
@ -35,7 +35,7 @@ import { listTransactionLinksAdmin } from '@/seeds/graphql/queries'
|
||||
import { UnconfirmedContribution } from '@model/UnconfirmedContribution'
|
||||
import { TRANSACTIONS_LOCK } from '@/util/TRANSACTIONS_LOCK'
|
||||
import { logger } from '@test/testSetup'
|
||||
import { EventType } from '@/event/Event'
|
||||
import { EventType } from '@/event/Events'
|
||||
|
||||
// mock semaphore to allow use fake timers
|
||||
jest.mock('@/util/TRANSACTIONS_LOCK')
|
||||
|
||||
@ -38,7 +38,7 @@ import {
|
||||
EVENT_TRANSACTION_LINK_CREATE,
|
||||
EVENT_TRANSACTION_LINK_DELETE,
|
||||
EVENT_TRANSACTION_LINK_REDEEM,
|
||||
} from '@/event/Event'
|
||||
} from '@/event/Events'
|
||||
|
||||
// TODO: do not export, test it inside the resolver
|
||||
export const transactionLinkCode = (date: Date): string => {
|
||||
|
||||
@ -11,7 +11,7 @@ import { User } from '@entity/User'
|
||||
import { GraphQLError } from 'graphql'
|
||||
import { Event as DbEvent } from '@entity/Event'
|
||||
import { findUserByEmail } from './UserResolver'
|
||||
import { EventType } from '@/event/Event'
|
||||
import { EventType } from '@/event/Events'
|
||||
import { userFactory } from '@/seeds/factory/user'
|
||||
import {
|
||||
confirmContribution,
|
||||
|
||||
@ -34,7 +34,7 @@ import {
|
||||
sendTransactionLinkRedeemedEmail,
|
||||
sendTransactionReceivedEmail,
|
||||
} from '@/emails/sendEmailVariants'
|
||||
import { EVENT_TRANSACTION_RECEIVE, EVENT_TRANSACTION_SEND } from '@/event/Event'
|
||||
import { EVENT_TRANSACTION_RECEIVE, EVENT_TRANSACTION_SEND } from '@/event/Events'
|
||||
|
||||
import { TRANSACTIONS_LOCK } from '@/util/TRANSACTIONS_LOCK'
|
||||
import LogError from '@/server/LogError'
|
||||
|
||||
@ -45,7 +45,7 @@ import {
|
||||
import { contributionLinkFactory } from '@/seeds/factory/contributionLink'
|
||||
import { transactionLinkFactory } from '@/seeds/factory/transactionLink'
|
||||
import { ContributionLink } from '@model/ContributionLink'
|
||||
import { EventType } from '@/event/Event'
|
||||
import { EventType } from '@/event/Events'
|
||||
import { peterLustig } from '@/seeds/users/peter-lustig'
|
||||
import { bobBaumeister } from '@/seeds/users/bob-baumeister'
|
||||
import { stephenHawking } from '@/seeds/users/stephen-hawking'
|
||||
|
||||
@ -70,7 +70,7 @@ import {
|
||||
EVENT_ADMIN_USER_ROLE_SET,
|
||||
EVENT_ADMIN_USER_DELETE,
|
||||
EVENT_ADMIN_USER_UNDELETE,
|
||||
} from '@/event/Event'
|
||||
} from '@/event/Events'
|
||||
import { isValidPassword } from '@/password/EncryptorUtils'
|
||||
import { encryptPassword, verifyPassword } from '@/password/PasswordEncryptor'
|
||||
import LogError from '@/server/LogError'
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user