prop
prop
TtRPC
Created by prop on 7/19/2023 in #❓-help
cookies not being set in procedure
This is all the code for setting my cookie
import { publicProcedure, router, userProcedure } from '$lib/trpc/t'

export const user = router({
testCookie: publicProcedure
.query(async ({ ctx: { cookies } }) => {
cookies.set("name", "value", {
path: '/'
})
})
})
import { publicProcedure, router, userProcedure } from '$lib/trpc/t'

export const user = router({
testCookie: publicProcedure
.query(async ({ ctx: { cookies } }) => {
cookies.set("name", "value", {
path: '/'
})
})
})
I'm using svelte-kit, but this doesn't set the cookie
8 replies