mirror of
https://github.com/danswer-ai/danswer.git
synced 2025-09-29 13:25:50 +02:00
@@ -331,7 +331,7 @@ export const togglePersonaVisibility = async (
|
|||||||
personaId: number,
|
personaId: number,
|
||||||
isVisible: boolean
|
isVisible: boolean
|
||||||
) => {
|
) => {
|
||||||
const response = await fetch(`/api/persona/${personaId}/visible`, {
|
const response = await fetch(`/api/admin/persona/${personaId}/visible`, {
|
||||||
method: "PATCH",
|
method: "PATCH",
|
||||||
headers: {
|
headers: {
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
|
@@ -306,7 +306,12 @@ export function AssistantsList({
|
|||||||
|
|
||||||
const [currentlyVisibleAssistants, setCurrentlyVisibleAssistants] = useState<
|
const [currentlyVisibleAssistants, setCurrentlyVisibleAssistants] = useState<
|
||||||
Persona[]
|
Persona[]
|
||||||
>(orderAssistantsForUser(visibleAssistants, user));
|
>([]);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
const orderedAssistants = orderAssistantsForUser(visibleAssistants, user);
|
||||||
|
setCurrentlyVisibleAssistants(orderedAssistants);
|
||||||
|
}, [assistants, user]);
|
||||||
|
|
||||||
const ownedButHiddenAssistants = getUserCreatedAssistants(
|
const ownedButHiddenAssistants = getUserCreatedAssistants(
|
||||||
user,
|
user,
|
||||||
|
Reference in New Issue
Block a user