API: rename poll_answer_id to poll_answer in post interactions vote endpoint
This commit is contained in:
parent
b1f357849b
commit
884de9008f
2 changed files with 17 additions and 17 deletions
|
|
@ -58,7 +58,7 @@ module Api
|
|||
def vote
|
||||
post = find_post
|
||||
begin
|
||||
poll_vote = poll_service.vote(post.id, params[:poll_answer_id])
|
||||
poll_vote = poll_service.vote(post.id, params[:poll_answer])
|
||||
rescue ActiveRecord::RecordNotFound
|
||||
# This, but not the find_post above, should return a 422,
|
||||
# we just keep poll_vote nil so it goes into the else below
|
||||
|
|
|
|||
|
|
@ -365,7 +365,7 @@ describe Api::V1::PostInteractionsController do
|
|||
post(
|
||||
api_v1_post_vote_path(@poll_post.guid),
|
||||
params: {
|
||||
poll_answer_id: @poll_answer.id,
|
||||
poll_answer: @poll_answer.id,
|
||||
access_token: access_token
|
||||
}
|
||||
)
|
||||
|
|
@ -377,7 +377,7 @@ describe Api::V1::PostInteractionsController do
|
|||
post(
|
||||
api_v1_post_vote_path(@poll_post.guid),
|
||||
params: {
|
||||
poll_answer_id: @poll_answer.id,
|
||||
poll_answer: @poll_answer.id,
|
||||
access_token: access_token
|
||||
}
|
||||
)
|
||||
|
|
@ -385,7 +385,7 @@ describe Api::V1::PostInteractionsController do
|
|||
post(
|
||||
api_v1_post_vote_path(@poll_post.guid),
|
||||
params: {
|
||||
poll_answer_id: @poll_answer.id,
|
||||
poll_answer: @poll_answer.id,
|
||||
access_token: access_token
|
||||
}
|
||||
)
|
||||
|
|
@ -396,7 +396,7 @@ describe Api::V1::PostInteractionsController do
|
|||
post(
|
||||
api_v1_post_vote_path(@poll_post.guid),
|
||||
params: {
|
||||
poll_answer_id: -1,
|
||||
poll_answer: -1,
|
||||
access_token: access_token
|
||||
}
|
||||
)
|
||||
|
|
@ -407,7 +407,7 @@ describe Api::V1::PostInteractionsController do
|
|||
post(
|
||||
api_v1_post_vote_path("999_999_999"),
|
||||
params: {
|
||||
poll_answer_id: @poll_answer.id,
|
||||
poll_answer: @poll_answer.id,
|
||||
access_token: access_token
|
||||
}
|
||||
)
|
||||
|
|
@ -418,7 +418,7 @@ describe Api::V1::PostInteractionsController do
|
|||
post(
|
||||
api_v1_post_vote_path(@poll_post.guid),
|
||||
params: {
|
||||
poll_answer_id: @poll_answer.id,
|
||||
poll_answer: @poll_answer.id,
|
||||
access_token: access_token_minimum_scopes
|
||||
}
|
||||
)
|
||||
|
|
@ -429,7 +429,7 @@ describe Api::V1::PostInteractionsController do
|
|||
post(
|
||||
api_v1_post_vote_path(@shared_post.guid),
|
||||
params: {
|
||||
poll_answer_id: @poll_answer.id,
|
||||
poll_answer: @poll_answer.id,
|
||||
access_token: access_token_public_only
|
||||
}
|
||||
)
|
||||
|
|
@ -440,7 +440,7 @@ describe Api::V1::PostInteractionsController do
|
|||
post(
|
||||
api_v1_post_vote_path(@poll_post.guid),
|
||||
params: {
|
||||
poll_answer_id: @poll_answer.id,
|
||||
poll_answer: @poll_answer.id,
|
||||
access_token: invalid_token
|
||||
}
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in a new issue