Skip to content

Commit

Permalink
Ensure register route updates session
Browse files Browse the repository at this point in the history
  • Loading branch information
Advayp committed Jan 18, 2025
1 parent 7417fdf commit d0fcd9e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions backend/.Dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
3 changes: 3 additions & 0 deletions backend/app/api/user/register/route.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import prisma from '@/lib/prisma';
import { createSession } from '@/lib/session';
import { User } from '@prisma/client';
import { NextRequest, NextResponse } from 'next/server';

Expand All @@ -21,5 +22,7 @@ export const POST = async (
},
});

await createSession(user.id);

return NextResponse.json({ user });
};

0 comments on commit d0fcd9e

Please sign in to comment.