mirror of
				https://codeberg.org/yeentown/barkey.git
				synced 2025-11-04 07:24:13 +00:00 
			
		
		
		
	attribute invite codes to admins/moderators
when a regular user (who has the appropriate permissions) creates an invite, we record that user's id in the `createdById` column but when an admin/mod creates an invite via the control panel, we didn't now we do
This commit is contained in:
		
							parent
							
								
									fed5ff50b3
								
							
						
					
					
						commit
						3ceac893c9
					
				
					 1 changed files with 2 additions and 0 deletions
				
			
		| 
						 | 
					@ -68,6 +68,8 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
 | 
				
			||||||
			for (let i = 0; i < ps.count; i++) {
 | 
								for (let i = 0; i < ps.count; i++) {
 | 
				
			||||||
				ticketsPromises.push(this.registrationTicketsRepository.insertOne({
 | 
									ticketsPromises.push(this.registrationTicketsRepository.insertOne({
 | 
				
			||||||
					id: this.idService.gen(),
 | 
										id: this.idService.gen(),
 | 
				
			||||||
 | 
										createdBy: me,
 | 
				
			||||||
 | 
										createdById: me.id,
 | 
				
			||||||
					expiresAt: ps.expiresAt ? new Date(ps.expiresAt) : null,
 | 
										expiresAt: ps.expiresAt ? new Date(ps.expiresAt) : null,
 | 
				
			||||||
					code: generateInviteCode(),
 | 
										code: generateInviteCode(),
 | 
				
			||||||
				}));
 | 
									}));
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		
		Reference in a new issue