Adds Messaging streaming
This commit is contained in:
@@ -37,13 +37,13 @@ const props = defineProps({
|
||||
|
||||
const client = useClient()
|
||||
const contents = ref([])
|
||||
const max_items = 10
|
||||
const page_size = 10
|
||||
const errorMessage = ref()
|
||||
let last_id = null
|
||||
|
||||
async function load({done}) {
|
||||
try {
|
||||
let uri = `/api/contents/user/${props.creatorId}?max_items=${max_items}`
|
||||
let uri = `/api/contents/user/${props.creatorId}?page_size=${page_size}`
|
||||
if (last_id !== null) uri = uri + `&last_id=${last_id}`
|
||||
|
||||
console.log(`Fetching content at: ${uri}`)
|
||||
@@ -59,7 +59,7 @@ async function load({done}) {
|
||||
last_id = last_content.id
|
||||
}
|
||||
|
||||
if (contentCount < max_items)
|
||||
if (contentCount < page_size)
|
||||
done('empty')
|
||||
else
|
||||
done('ok')
|
||||
|
||||
Reference in New Issue
Block a user