mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
remove apollo log plugin hack, improve model
This commit is contained in:
parent
fae9d91004
commit
80650e60b8
@ -5,7 +5,7 @@ import { User } from './User'
|
||||
|
||||
@ObjectType()
|
||||
export class TransactionLink {
|
||||
constructor(transactionLink: dbTransactionLink, user: User) {
|
||||
constructor(transactionLink: dbTransactionLink, user: User, redeemedBy: User | null = null) {
|
||||
this.id = transactionLink.id
|
||||
this.user = user
|
||||
this.amount = transactionLink.amount
|
||||
@ -15,10 +15,9 @@ export class TransactionLink {
|
||||
this.createdAt = transactionLink.createdAt
|
||||
this.validUntil = transactionLink.validUntil
|
||||
this.showEmail = transactionLink.showEmail
|
||||
// Type 'Date | null | undefined' is not assignable to type 'Date | null'.
|
||||
this.deletedAt = null // transactionLink.deletedAt
|
||||
this.redeemedAt = null // transactionLink.redeemedAt
|
||||
this.redeemedBy = null // transactionLink.redeemedBy
|
||||
this.deletedAt = transactionLink.deletedAt
|
||||
this.redeemedAt = transactionLink.redeemedAt
|
||||
this.redeemedBy = redeemedBy
|
||||
}
|
||||
|
||||
@Field(() => Number)
|
||||
|
||||
@ -40,8 +40,6 @@ const apolloLogPlugin = ApolloLogPlugin({
|
||||
})
|
||||
|
||||
const plugins =
|
||||
process.env.NODE_ENV === 'development' || process.env.NODE_ENV === '"development"'
|
||||
? [setHeadersPlugin]
|
||||
: [setHeadersPlugin, apolloLogPlugin]
|
||||
process.env.NODE_ENV === 'development' ? [setHeadersPlugin] : [setHeadersPlugin, apolloLogPlugin]
|
||||
|
||||
export default plugins
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user