mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-05 02:39:33 +02:00
Add abuse and registration requests stats
This commit is contained in:
parent
fbe47a9f8e
commit
db69d9491e
25 changed files with 638 additions and 227 deletions
|
@ -160,6 +160,8 @@ async function acceptRegistration (req: express.Request, res: express.Response)
|
|||
registration.state = UserRegistrationState.ACCEPTED
|
||||
registration.moderationResponse = body.moderationResponse
|
||||
|
||||
if (!registration.processedAt) registration.processedAt = new Date()
|
||||
|
||||
await registration.save()
|
||||
|
||||
logger.info('Registration of %s accepted', registration.username)
|
||||
|
@ -178,6 +180,8 @@ async function rejectRegistration (req: express.Request, res: express.Response)
|
|||
registration.state = UserRegistrationState.REJECTED
|
||||
registration.moderationResponse = body.moderationResponse
|
||||
|
||||
if (!registration.processedAt) registration.processedAt = new Date()
|
||||
|
||||
await registration.save()
|
||||
|
||||
if (body.preventEmailDelivery !== true) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue