mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-24 22:51:14 -05:00
Fix edge function logging and types
This commit is contained in:
@@ -93,11 +93,17 @@ export function ProfileManager() {
|
||||
setActionLoading(targetUserId);
|
||||
try {
|
||||
// Prepare update data
|
||||
const updateData: any = { banned: ban };
|
||||
interface ProfileUpdateData {
|
||||
banned: boolean;
|
||||
ban_reason?: string | null;
|
||||
ban_expires_at?: string | null;
|
||||
}
|
||||
|
||||
const updateData: ProfileUpdateData = { banned: ban };
|
||||
|
||||
if (ban && banReason) {
|
||||
updateData.ban_reason = banReason;
|
||||
updateData.ban_expires_at = banExpiresAt;
|
||||
updateData.ban_expires_at = banExpiresAt ? banExpiresAt.toISOString() : null;
|
||||
} else if (!ban) {
|
||||
// Clear ban data when unbanning
|
||||
updateData.ban_reason = null;
|
||||
|
||||
Reference in New Issue
Block a user