mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
26 lines
581 B
TypeScript
26 lines
581 B
TypeScript
import { Contribution as DbContribution } from '@entity/Contribution'
|
|
import { Event as DbEvent } from '@entity/Event'
|
|
import { User as DbUser } from '@entity/User'
|
|
import { Decimal } from 'decimal.js-light'
|
|
|
|
import { Event, EventType } from './Event'
|
|
|
|
export const EVENT_ADMIN_CONTRIBUTION_DENY = async (
|
|
user: DbUser,
|
|
moderator: DbUser,
|
|
contribution: DbContribution,
|
|
amount: Decimal,
|
|
): Promise<DbEvent> =>
|
|
Event(
|
|
EventType.ADMIN_CONTRIBUTION_DENY,
|
|
user,
|
|
moderator,
|
|
null,
|
|
null,
|
|
contribution,
|
|
null,
|
|
null,
|
|
null,
|
|
amount,
|
|
).save()
|