add image upload, fix styles

This commit is contained in:
smanylov
2025-12-09 16:35:47 +07:00
parent 7e485ee524
commit c8e8be8935
28 changed files with 547 additions and 83 deletions
+23
View File
@@ -0,0 +1,23 @@
import 'server-only'
import { cookies } from 'next/headers'
import { decrypt } from '@/app/actions/session'
export async function updateSession() {
const session = (await cookies()).get('session')?.value
const payload = await decrypt(session)
if (!session || !payload) {
return null
}
const expires = new Date(Date.now() + 7 * 24 * 60 * 60 * 1000)
const cookieStore = await cookies()
cookieStore.set('session', session, {
httpOnly: true,
secure: true,
expires: expires,
sameSite: 'lax',
path: '/',
})
}