mysql
This commit is contained in:
@@ -23,9 +23,16 @@ namespace Nevyn.Controllers
|
||||
|
||||
// GET: api/ShoppingLists
|
||||
[HttpGet]
|
||||
public async Task<ActionResult<IEnumerable<WalletDTO>>> GetWallet()
|
||||
public async Task<ActionResult<WalletDTO>> GetWallet()
|
||||
{
|
||||
return await _context.UpdateWallet.Select(x => ItemToDTO(x)).ToListAsync();
|
||||
Wallet wallet = await _context.UpdateWallet.FindAsync(1);
|
||||
|
||||
if (wallet == null)
|
||||
{
|
||||
wallet = new Wallet();
|
||||
wallet.updateFromDatabase();
|
||||
}
|
||||
return ItemToDTO(wallet);
|
||||
}
|
||||
|
||||
// GET: api/ShoppingLists/5
|
||||
|
||||
Reference in New Issue
Block a user