Made it this way so that I can use the PostAndCommentService as a child
of the PostService and CommentService.
Signed-off-by: Vartan Benohanian <vartanbeno@gmail.com>
Also started using slices of pointers instead of slices of structs. This
is useful especially in the case of adding to the list of replies of a
comment. If the comment is a plain old struct (non-pointer), the change
wouldn't happen
Signed-off-by: Vartan Benohanian <vartanbeno@gmail.com>
Some functionality such as saving, voting, deleting, etc. is common to
both posts and comments, so this service will hold such methods.
Tweaked the separate post/comment services accordingly. Fixed tests.
Signed-off-by: Vartan Benohanian <vartanbeno@gmail.com>