mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
creationDate to string and changed the other parameters to int
This commit is contained in:
parent
ade3719c33
commit
33c50560d6
@ -1,19 +1,19 @@
|
||||
import { ArgsType, Field } from 'type-graphql'
|
||||
import { ArgsType, Field, Int } from 'type-graphql'
|
||||
|
||||
@ArgsType()
|
||||
export default class CreatePendingCreationArgs {
|
||||
@Field(() => String)
|
||||
email: string
|
||||
|
||||
@Field(() => Number)
|
||||
@Field(() => Int)
|
||||
amount: number
|
||||
|
||||
@Field(() => String)
|
||||
note: string
|
||||
|
||||
@Field(() => Date)
|
||||
creationDate: Date
|
||||
@Field(() => String)
|
||||
creationDate: string
|
||||
|
||||
@Field(() => Number)
|
||||
@Field(() => Int)
|
||||
moderator: number
|
||||
}
|
||||
|
||||
@ -35,14 +35,14 @@ export class AdminResolver {
|
||||
const user = await userRepository.findByEmail(email)
|
||||
|
||||
const creations = await getUserCreations(user.id)
|
||||
|
||||
if (isCreationValid(creations, amount, creationDate)) {
|
||||
const creationDateObj = new Date(creationDate)
|
||||
if (isCreationValid(creations, amount, creationDateObj)) {
|
||||
const pendingCreationRepository = getCustomRepository(PendingCreationRepository)
|
||||
const loginPendingTaskAdmin = pendingCreationRepository.create()
|
||||
loginPendingTaskAdmin.userId = user.id
|
||||
loginPendingTaskAdmin.amount = BigInt(amount * 10000)
|
||||
loginPendingTaskAdmin.created = new Date()
|
||||
loginPendingTaskAdmin.date = new Date(creationDate)
|
||||
loginPendingTaskAdmin.date = creationDateObj
|
||||
loginPendingTaskAdmin.note = note
|
||||
loginPendingTaskAdmin.moderator = moderator
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user