Skip to content

Commit

Permalink
fix: fix issue with duration calculation on wifi vouchers
Browse files Browse the repository at this point in the history
  • Loading branch information
Arcath committed Aug 11, 2023
1 parent f207dbe commit a119b94
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/routes/wifi.create.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export const action: ActionFunction = async ({request}) => {
const prisma = getPrisma()

const response = await unifi.createVouchers(
parseInt(duration) * 86400,
parseInt(duration) * 1440,
parseInt(count),
multiUse ? 0 : 1
)
Expand All @@ -69,7 +69,7 @@ export const action: ActionFunction = async ({request}) => {

await log(
'Guest WiFi',
`Created ${count} ${parseInt(duration) * 86400} day ${
`Created ${count} ${parseInt(duration) * 1440} day ${
multiUse ? 'Multi Use' : ''
} vouchers`,
user.username
Expand Down

0 comments on commit a119b94

Please sign in to comment.