@@ 35-40 (lines=6) @@ | ||
32 | ||
33 | isTokenFreshByAccessToken($location, $accessToken); |
|
34 | ||
35 | if($_POST['vote'] == "up") { |
|
36 | $accountCreator = new Upvote(); |
|
37 | } |
|
38 | else if($_POST['vote'] == "down") { |
|
39 | $accountCreator = new Downvote(); |
|
40 | } |
|
41 | ||
42 | $accountCreator->setAccessToken($accessToken); |
|
43 | $accountCreator->postId = $_POST['postId']; |
@@ 116-121 (lines=6) @@ | ||
113 | ||
114 | //Vote |
|
115 | if(isset($_GET['vote']) && isset($_GET['postID'])) { |
|
116 | if($_GET['vote'] == "up") { |
|
117 | $accountCreator = new Upvote(); |
|
118 | } |
|
119 | else if($_GET['vote'] == "down") { |
|
120 | $accountCreator = new Downvote(); |
|
121 | } |
|
122 | $accountCreator->setAccessToken($accessToken); |
|
123 | $accountCreator->postId = $_GET['postID']; |
|
124 | $data = $accountCreator->execute(); |