mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-20 18:51:11 -05:00
feat: Implement authentication integration
This commit is contained in:
@@ -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({
|
||||
|
||||
Reference in New Issue
Block a user