Skip to content

Commit

Permalink
Merge pull request #172 from raffacabofrio/master
Browse files Browse the repository at this point in the history
Bugfix pra issue 139. Vai precisar de uma PR em front também que eu …
  • Loading branch information
raffacabofrio authored Dec 13, 2018
2 parents f938266 + ba1cb4e commit 89e481a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 2 additions & 0 deletions ShareBook/ShareBook.Api/ViewModels/UpdateBookVM.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ public class UpdateBookVM : BaseViewModel

public Guid CategoryId { get; set; }

public Guid UserId { get; set; }

public bool Approved { get; set; }

public string ImageName { get; set; }
Expand Down
4 changes: 0 additions & 4 deletions ShareBook/ShareBook.Service/Book/BookService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,6 @@ public Result<Book> Approve(Guid bookId, DateTime? chooseDate = null)
book.ChooseDate = chooseDate?.Date ?? DateTime.Today.AddDays(5);
_repository.Update(book);

// TODO: obter o usuário doador. Não o usuário logado.
// Github issue: https://github.com/SharebookBR/sharebook-backend/issues/139
book.UserId = new Guid(Thread.CurrentPrincipal?.Identity?.Name);
_booksEmailService.SendEmailBookApproved(book).Wait();

return new Result<Book>(book);
Expand Down Expand Up @@ -155,7 +152,6 @@ public override Result<Book> Update(Book entity)
this.Approve(entity.Id);
}


return result;
}

Expand Down

0 comments on commit 89e481a

Please sign in to comment.