feat: Implement authentication integration

This commit is contained in:
gpt-engineer-app[bot]
2025-09-30 13:51:59 +00:00
parent 083a4af08c
commit f7ce456cc0
3 changed files with 30 additions and 4 deletions

View File

@@ -154,6 +154,10 @@ export async function approveSubmissionItems(
items: SubmissionItemWithDeps[],
userId: string
): Promise<void> {
if (!userId) {
throw new Error('User authentication required to approve items');
}
// Sort by dependency order (parents first)
const sortedItems = topologicalSort(items);
@@ -285,6 +289,10 @@ export async function escalateSubmission(
reason: string,
userId: string
): Promise<void> {
if (!userId) {
throw new Error('User authentication required to escalate submission');
}
const { error } = await supabase
.from('content_submissions')
.update({