feat: Implement video play count tracking, refactor user update API, add missing CMS delete functions, and update database transaction handling.
This commit is contained in:
@@ -34,7 +34,7 @@ export default function UsersPage() {
|
||||
|
||||
const handleUpdateUser = async (userId: string, role: string, orgId: string) => {
|
||||
try {
|
||||
await cmsApi.updateUser(userId, role, orgId);
|
||||
await cmsApi.updateUser(userId, { role, organization_id: orgId });
|
||||
loadData();
|
||||
} catch (error) {
|
||||
console.error('Failed to update user', error);
|
||||
|
||||
@@ -3,10 +3,10 @@
|
||||
import { useState, useEffect } from "react";
|
||||
import { useAuth } from "@/context/AuthContext";
|
||||
import { cmsApi } from "@/lib/api";
|
||||
import { User, Save, Shield, Mail, User as UserIcon, Building } from "lucide-react";
|
||||
import { Save, Shield, Mail, User as UserIcon, Building } from "lucide-react";
|
||||
|
||||
export default function ProfilePage() {
|
||||
const { user, token, logout } = useAuth();
|
||||
const { user, logout } = useAuth();
|
||||
const [fullName, setFullName] = useState(user?.full_name || "");
|
||||
const [email, setEmail] = useState(user?.email || "");
|
||||
const [saving, setSaving] = useState(false);
|
||||
|
||||
Reference in New Issue
Block a user