mirror of
https://github.com/lukevella/rallly.git
synced 2025-05-30 01:06:22 +02:00
♻️ Switch to app router (#922)
This commit is contained in:
parent
41f85279bb
commit
95feb9f01a
181 changed files with 2507 additions and 2494 deletions
|
@ -178,7 +178,10 @@ export const polls = router({
|
|||
if (input.optionsToAdd && input.optionsToAdd.length > 0) {
|
||||
await prisma.option.createMany({
|
||||
data: input.optionsToAdd.map((optionValue) => {
|
||||
const [start, end] = optionValue.split("/");
|
||||
const [start, end] = z
|
||||
.tuple([z.string(), z.string()])
|
||||
.parse(optionValue.split("/"));
|
||||
|
||||
if (end) {
|
||||
return {
|
||||
start: new Date(`${start}Z`),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue