mirror of
https://github.com/MewoLab/AquaDX.git
synced 2025-10-26 04:22:38 +00:00
[+] Add profile picture field to aqua net user
This commit is contained in:
parent
441d7376cb
commit
68626fecd7
@ -208,7 +208,11 @@ class UserRegistrar(
|
||||
if (!mime.startsWith("image/")) 400 - "Invalid file type"
|
||||
|
||||
// Save the image
|
||||
(portraitPath / "${u.auId}.${MIMES.forName(mime)?.extension ?: "jpg"}").writeBytes(bytes)
|
||||
val name = "${u.auId}.${MIMES.forName(mime)?.extension ?: "jpg"}"
|
||||
async {
|
||||
(portraitPath / name).writeBytes(bytes)
|
||||
userRepo.save(u.apply { profilePicture = name })
|
||||
}
|
||||
|
||||
SUCCESS
|
||||
}
|
||||
|
||||
@ -52,6 +52,7 @@ class AquaNetUser(
|
||||
// Profile fields
|
||||
var profileLocation: String = "",
|
||||
var profileBio: String = "",
|
||||
var profilePicture: String = "",
|
||||
|
||||
// Email confirmation
|
||||
var emailConfirmed: Boolean = false,
|
||||
|
||||
1
src/main/resources/db/migration/mariadb/V1000_3__pfp.sql
Normal file
1
src/main/resources/db/migration/mariadb/V1000_3__pfp.sql
Normal file
@ -0,0 +1 @@
|
||||
ALTER TABLE aqua_net_user ADD profile_picture VARCHAR(255) NULL;
|
||||
Loading…
x
Reference in New Issue
Block a user