Compare commits
No commits in common. "eade0f6d694853dc3d49b7122201bf7ced22a195" and "e803adb387c1faa8a07d9bdd2adf8afa77746397" have entirely different histories.
eade0f6d69
...
e803adb387
@ -36,11 +36,8 @@ namespace Api.DBAccess
|
|||||||
}
|
}
|
||||||
|
|
||||||
_context.Users.Add(user);
|
_context.Users.Add(user);
|
||||||
bool saved = await _context.SaveChangesAsync() == 1;
|
|
||||||
|
return new OkObjectResult(await _context.SaveChangesAsync());
|
||||||
if (saved) { return new OkObjectResult(true); }
|
|
||||||
|
|
||||||
return new ConflictObjectResult(new { message = "Could not save to databse" });
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<User> Login(Login login)
|
public async Task<User> Login(Login login)
|
||||||
@ -111,7 +108,7 @@ namespace Api.DBAccess
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
_context.Users.Remove(user);
|
_context.Users.Remove(user);
|
||||||
bool saved = await _context.SaveChangesAsync() >= 0;
|
bool saved = await _context.SaveChangesAsync() == 1;
|
||||||
|
|
||||||
if (saved) { return new OkObjectResult(saved); }
|
if (saved) { return new OkObjectResult(saved); }
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user