mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-07-08 10:44:20 -04:00
Solving a bug with the account update method
This commit is contained in:
parent
eb132c2da2
commit
eb37ec7d1b
@ -31,11 +31,11 @@ namespace Kyoo.Api
|
||||
|
||||
public class AccountData
|
||||
{
|
||||
[FromQuery(Name = "email")]
|
||||
[FromForm(Name = "email")]
|
||||
public string Email { get; set; }
|
||||
[FromQuery(Name = "username")]
|
||||
[FromForm(Name = "username")]
|
||||
public string Username { get; set; }
|
||||
[FromQuery(Name = "picture")]
|
||||
[FromForm(Name = "picture")]
|
||||
public IFormFile Picture { get; set; }
|
||||
}
|
||||
|
||||
@ -116,7 +116,10 @@ namespace Kyoo.Api
|
||||
User user = await _userManager.FindByNameAsync(username);
|
||||
if (user == null)
|
||||
return BadRequest();
|
||||
return new PhysicalFileResult(Path.Combine(_picturePath, user.Id), "image/png");
|
||||
string path = Path.Combine(_picturePath, user.Id);
|
||||
if (!System.IO.File.Exists(path))
|
||||
return NotFound();
|
||||
return new PhysicalFileResult(path, "image");
|
||||
}
|
||||
|
||||
[HttpPost("update")]
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 044132d4bf052f61c99186258e9aaf6da571b4ca
|
||||
Subproject commit 54f9406c079894648b9a84a63aa7944c8d439ce4
|
Loading…
x
Reference in New Issue
Block a user