small changes to update recipe
This commit is contained in:
parent
f9e006539c
commit
571a258c18
@ -65,7 +65,6 @@ class EditDishActivity : AppCompatActivity() {
|
||||
.filter { it.isNotEmpty() }
|
||||
|
||||
val updatedRecipe = Recipe(
|
||||
id = null,
|
||||
name = findViewById<EditText>(R.id.dishName).text.toString().trim(),
|
||||
description = findViewById<EditText>(R.id.dishDescription).text.toString().trim(),
|
||||
directions = directions,
|
||||
|
@ -49,7 +49,7 @@ namespace API.DBAccess
|
||||
|
||||
bool saved = await _context.SaveChangesAsync() >= 1;
|
||||
|
||||
if (saved) { return new OkObjectResult(recipe); }
|
||||
if (saved) { return new OkObjectResult(saved); }
|
||||
|
||||
return new ConflictObjectResult(new { message = "Could not save to database" });
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user