Skip to content

Commit 212b868

Browse files
committed
refactor: rename user_id parameter to submitted_by for consistency in submission filtering
1 parent 2f83898 commit 212b868

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/lib/services/submission-service.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ export class SubmissionService {
318318
search = '',
319319
sortBy = 'created_at',
320320
sortOrder = 'desc',
321-
user_id = null
321+
submitted_by = null
322322
} = options;
323323

324324
try {
@@ -354,9 +354,9 @@ export class SubmissionService {
354354
}
355355
}
356356

357-
// Filter by user_id if provided
358-
if (user_id) {
359-
query = query.eq('submitted_by', user_id);
357+
// Filter by submitted_by if provided
358+
if (submitted_by) {
359+
query = query.eq('submitted_by', submitted_by);
360360
}
361361

362362
// Filter by tags

src/routes/api/submissions/+server.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ export async function GET({ url, locals }) {
198198
});
199199

200200
// Filter by user and include all statuses for their own submissions
201-
options.user_id = user.id;
201+
options.submitted_by = user.id;
202202
options.status = searchParams.get('status') || 'all'; // Default to all statuses for user's own submissions
203203
} else {
204204
// Use default service for public submissions

0 commit comments

Comments
 (0)