remove _id when converting to json
This commit is contained in:
		
							parent
							
								
									d793ff44fd
								
							
						
					
					
						commit
						b691bba6c7
					
				@ -525,7 +525,13 @@ weaponSkinsSchema.virtual("ItemId").get(function () {
 | 
				
			|||||||
    return { $oid: this._id.toString() };
 | 
					    return { $oid: this._id.toString() };
 | 
				
			||||||
});
 | 
					});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
weaponSkinsSchema.set("toJSON", { virtuals: true });
 | 
					weaponSkinsSchema.set("toJSON", {
 | 
				
			||||||
 | 
					    virtuals: true,
 | 
				
			||||||
 | 
					    transform(_doc, ret, _options) {
 | 
				
			||||||
 | 
					        delete ret._id;
 | 
				
			||||||
 | 
					        delete ret.__v;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const tauntHistorySchema = new Schema<ITauntHistory>(
 | 
					const tauntHistorySchema = new Schema<ITauntHistory>(
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user