clean up frontend
This commit is contained in:
@@ -10,13 +10,17 @@ export default class ConversationRoute extends Route {
|
||||
}
|
||||
|
||||
async model({ id }) {
|
||||
const [conversation, agents] = await Promise.all([
|
||||
const [conversation, agents, conversations] = await Promise.all([
|
||||
this.store.findRecord('chat-conversation', id, {
|
||||
include: 'messages.attachments',
|
||||
reload: true,
|
||||
}),
|
||||
this.store.query('chat-agent', { 'page[size]': 1 }),
|
||||
this.store.query('chat-conversation', {
|
||||
sort: '-last-activity',
|
||||
'page[size]': 50,
|
||||
}),
|
||||
]);
|
||||
return { conversation, assistant: agents[0] };
|
||||
return { conversation, assistant: agents[0], conversations };
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user