mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-07-27 15:38:39 +00:00
Dont hardcode user as "jvyden"
This commit is contained in:
parent
b287e34425
commit
59ba45036d
7 changed files with 37 additions and 14 deletions
|
@ -31,9 +31,9 @@ namespace ProjectLighthouse.Controllers {
|
|||
[HttpPost("updateUser")]
|
||||
public async Task<IActionResult> UpdateUser() {
|
||||
await using Database database = new();
|
||||
User user = await database.Users.Where(u => u.Username == "jvyden").FirstOrDefaultAsync();
|
||||
User user = await database.UserFromRequest(Request);
|
||||
|
||||
if(user == null) return this.BadRequest();
|
||||
if(user == null) return this.StatusCode(403, "");
|
||||
|
||||
XmlReaderSettings settings = new() {
|
||||
Async = true // this is apparently not default
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue