Create PostAndCommentService, holds common methods

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>
This commit is contained in:
Vartan Benohanian
2020-07-13 23:05:24 -04:00
parent 838db037b9
commit ec7e8abe8e
10 changed files with 551 additions and 371 deletions
+3 -1
View File
@@ -70,11 +70,13 @@ func testClientServices(t *testing.T, c *Client) {
"Comment",
"Flair",
"Listings",
"Moderation",
"Multi",
"Post",
"PostAndComment",
"Search",
"Subreddit",
"User",
"Vote",
}
cp := reflect.ValueOf(c)