Merge branch 'fix/electron_premium_since' into maddyrtc
This commit is contained in:
		
						commit
						3b439f74f1
					
				| @ -57,12 +57,14 @@ router.patch("/", route({ body: "UserModifySchema" }), async (req: Request, res: | ||||
| 		user.data.hash = await bcrypt.hash(body.new_password, 12); | ||||
| 	} | ||||
| 
 | ||||
| 	var check_username = body?.username?.replace(/\s/g, ''); | ||||
| 	if(!check_username && !body?.avatar && !body?.banner) { | ||||
| 		throw FieldErrors({ | ||||
| 			username: { code: "BASE_TYPE_REQUIRED", message: req.t("common:field.BASE_TYPE_REQUIRED") } | ||||
| 		}); | ||||
| 	} | ||||
|     if(body.username){ | ||||
|         var check_username = body?.username?.replace(/\s/g, ''); | ||||
|         if(!check_username) { | ||||
|             throw FieldErrors({ | ||||
|                 username: { code: "BASE_TYPE_REQUIRED", message: req.t("common:field.BASE_TYPE_REQUIRED") } | ||||
|             }); | ||||
|         } | ||||
|     } | ||||
| 
 | ||||
| 	await user.save(); | ||||
| 
 | ||||
|  | ||||
| @ -86,7 +86,7 @@ export class Member extends BaseClassWithoutId { | ||||
| 	joined_at: Date; | ||||
| 
 | ||||
| 	@Column({ nullable: true }) | ||||
| 	premium_since?: Date; | ||||
| 	premium_since?: number; | ||||
| 
 | ||||
| 	@Column() | ||||
| 	deaf: boolean; | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Madeline
						Madeline