Skip to content

Commit 7387433

Browse files
Zeff01claude
andcommitted
Fix auth_id column reference in hire server actions
- Changed .eq('auth_id', user.id) to .eq('id', user.id) in both updateJobListing and deleteJobListing functions - The codev table uses 'id' column that matches auth.users.id, not 'auth_id' - This fixes the database query error when admins try to update/delete job listings 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 6fffad4 commit 7387433

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎apps/codebility/app/home/hire/actions.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export async function updateJobListing(
2929
const { data: userData } = await supabase
3030
.from('codev')
3131
.select('id, role_id')
32-
.eq('auth_id', user.id)
32+
.eq('id', user.id)
3333
.single();
3434

3535
if (!userData) {
@@ -100,7 +100,7 @@ export async function deleteJobListing(jobId: string) {
100100
const { data: userData } = await supabase
101101
.from('codev')
102102
.select('id, role_id')
103-
.eq('auth_id', user.id)
103+
.eq('id', user.id)
104104
.single();
105105

106106
if (!userData) {

0 commit comments

Comments
 (0)