File tree Expand file tree Collapse file tree 2 files changed +9
-4
lines changed
packages/devextreme-cli/src
templates/nextjs/application/src/app/lib Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -74,7 +74,12 @@ const create = async(appName, options) => {
7474 commandArguments = [
7575 ...commandArguments ,
7676 `${ templateOptions . isTypeScript ? '--typescript' : '--javascript' } ` ,
77- '--yes' ,
77+ '--eslint' ,
78+ '--no-tailwind' ,
79+ '--src-dir' ,
80+ '--app' ,
81+ '--no-turbopack' ,
82+ '--import-alias "@/*"' ,
7883 ] ;
7984
8085 await runCommand ( 'npx' , commandArguments ) ;
Original file line number Diff line number Diff line change @@ -14,15 +14,15 @@ export async function encrypt(payload<%=#isTypeScript%>: SessionPayload<%=/isTyp
1414 . setExpirationTime ( '7d' )
1515 . sign ( encodedKey ) ;
1616}
17-
17+
1818export async function decrypt ( session < %= #isTypeScript% > : string | undefined = '' < %= / i s T y p e S c r i p t % > ) {
1919 try {
2020 const { payload } = await jwtVerify ( session , encodedKey , {
2121 algorithms : [ 'HS256' ] ,
2222 } ) ;
2323
2424 return payload ;
25- } catch ( error ) {
25+ } catch {
2626 console . log ( 'Failed to verify session' ) ;
2727 }
2828}
@@ -31,7 +31,7 @@ export async function createSession(userId<%=#isTypeScript%>: string<%=/isTypeSc
3131 const expiresAt = new Date ( Date . now ( ) + 7 * 24 * 60 * 60 * 1000 ) ;
3232 const session = await encrypt ( { userId, expiresAt } ) ;
3333 const cookieStore = await cookies ( ) ;
34-
34+
3535 cookieStore . set ( 'session' , session , {
3636 httpOnly : true ,
3737 secure : true ,
You can’t perform that action at this time.
0 commit comments