mirror of
https://github.com/BrenBroZAYT/gameyfin.git
synced 2026-06-15 16:20:03 +00:00
Fix bug in avatar upload
This commit is contained in:
@@ -53,7 +53,7 @@ class ImageEndpoint(
|
||||
fun uploadAvatar(@RequestParam("file") file: MultipartFile) {
|
||||
val auth: Authentication = SecurityContextHolder.getContext().authentication
|
||||
|
||||
val image: Image = if (userService.hasAvatar(auth.name)) {
|
||||
val image: Image = if (!userService.hasAvatar(auth.name)) {
|
||||
imageService.createFile(ImageType.AVATAR, file.inputStream, file.contentType!!)
|
||||
} else {
|
||||
val existingAvatar = userService.getAvatar(auth.name)!!
|
||||
|
||||
Reference in New Issue
Block a user