feat: return count of Entries for get all
This commit is contained in:
parent
672987a2fa
commit
eb42c87a6e
1 changed files with 3 additions and 4 deletions
|
|
@ -18,10 +18,9 @@ export default class EntriesService {
|
||||||
.all()
|
.all()
|
||||||
.slice(0, Number(limit) || -1)
|
.slice(0, Number(limit) || -1)
|
||||||
|
|
||||||
if (sort === "date") {
|
return {
|
||||||
return sortByDate(entries)
|
count: entries.length,
|
||||||
}
|
entries: sort === "date" ? sortByDate(entries) : sortByTitle(entries),
|
||||||
|
}
|
||||||
return sortByTitle(entries)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue