[Assistants settings] Update reported data backend#871
[Assistants settings] Update reported data backend#871
reported data backend#871Conversation
256ee00 to
7bd937b
Compare
reported data backend
| } | ||
|
|
||
| export async function load({ parent, params, locals }) { | ||
| const data = await parent(); |
There was a problem hiding this comment.
Note that this triggers the root's +layout.server.ts's load.
So each time we switch assistant, this will trigger a load of all assistants
IMO we can keep the redirect in page.ts - that way the load isn't triggered - since the frontend will be able to execute it.
TLDR:
- Keep
page.tsas is - remove the redirect /
parent()call here - The rest of the PR is great!
|
How does it work when you have both a server load function and a universal load function for the same |
// `data` comes from the server load function
export async function load({ parent, data }) {
const res = await parent();
// checks
...
return data;
}Something like that |
Only check if current assistant that is being viewed was
reported.Previously, we were checking
reportedstatus on all the assistants of a user. However, thisreportedstatus is only useful for the assistant that is currently being viewed