1
0
Fork 0
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:
Chocobozzz 2024-02-21 13:48:52 +01:00
parent fbe47a9f8e
commit db69d9491e
No known key found for this signature in database
GPG key ID: 583A612D890159BE
25 changed files with 638 additions and 227 deletions

View file

@ -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) {