public async Task <ActionResult <IEnumerable <Spending> > > GetSpendings() { var user = await _repository.ValidUser(GetTokenUserId()); if (user == null) { return(NotFound()); } var spendings = await _repository.GetAll(user.Id); if (spendings == null) { return(NotFound()); } return(Ok(spendings)); }