commit: 021fbd9b5863ee47a51437bf70d986f74dbc021d
parent fa532b1f005220743d036b7d103c47a043be7ae4
Author: HJ <30-hj@users.noreply.git.pleroma.social>
Date: Tue, 21 Mar 2023 15:05:25 +0000
Merge branch 'poll-expiration-parseInt-before-posting-#1251' into 'develop'
add parseInt in poll expires_in to make sure FE sends integers in all cases
Closes #1251
See merge request pleroma/pleroma-fe!1802
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/services/api/api.service.js b/src/services/api/api.service.js
@@ -840,7 +840,7 @@ const postStatus = ({
})
if (pollOptions.some(option => option !== '')) {
const normalizedPoll = {
- expires_in: poll.expiresIn,
+ expires_in: parseInt(poll.expiresIn, 10),
multiple: poll.multiple
}
Object.keys(normalizedPoll).forEach(key => {
@@ -897,7 +897,7 @@ const editStatus = ({
if (pollOptions.some(option => option !== '')) {
const normalizedPoll = {
- expires_in: poll.expiresIn,
+ expires_in: parseInt(poll.expiresIn, 10),
multiple: poll.multiple
}
Object.keys(normalizedPoll).forEach(key => {