aboutsummaryrefslogtreecommitdiff
path: root/src/services/api/api.service.js
diff options
context:
space:
mode:
authorjonossa <hello@jonossaseuraava.net>2023-03-21 16:43:16 +0200
committerjonossa <hello@jonossaseuraava.net>2023-03-21 16:43:16 +0200
commitc9072ddb0b5ab1daef1f461982a6c57460a75dfe (patch)
treec0fe88082880bc826143fe0e9515e849c1f15013 /src/services/api/api.service.js
parentfa532b1f005220743d036b7d103c47a043be7ae4 (diff)
add parseInt in poll expires_in to make sure FE sends integers in all cases
Diffstat (limited to 'src/services/api/api.service.js')
-rw-r--r--src/services/api/api.service.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/services/api/api.service.js b/src/services/api/api.service.js
index b8c10b21..259e5b30 100644
--- 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 => {