1
0
mirror of https://git.sr.ht/~cadence/bibliogram synced 2025-12-16 03:08:47 +00:00

Hopefully the final assistants changes

This commit is contained in:
Cadence Ember
2020-04-13 02:52:04 +12:00
parent dc91575e1c
commit 41cbffa95a
9 changed files with 97 additions and 29 deletions

View File

@@ -7,7 +7,7 @@ module.exports = [
{route: `/u/(${constants.external.username_regex})/(rss|atom)\\.xml`, methods: ["GET"], code: ({fill}) => {
if (constants.settings.rss_enabled) {
const kind = fill[1]
return fetchUser(fill[0], true).then(async user => {
return fetchUser(fill[0], constants.symbols.fetch_context.RSS).then(async user => {
const feed = await user.timeline.fetchFeed()
if (kind === "rss") {
var data = {

View File

@@ -63,7 +63,7 @@ module.exports = [
}
const params = url.searchParams
return fetchUser(fill[0], false).then(async user => {
return fetchUser(fill[0]).then(async user => {
const page = +params.get("page")
if (typeof page === "number" && !isNaN(page) && page >= 1) {
await user.timeline.fetchUpToPage(page - 1)
@@ -97,7 +97,7 @@ module.exports = [
},
{
route: `/fragment/user/(${constants.external.username_regex})/(\\d+)`, methods: ["GET"], code: async ({url, fill}) => {
return fetchUser(fill[0], false).then(async user => {
return fetchUser(fill[0]).then(async user => {
const pageNumber = +fill[1]
const pageIndex = pageNumber - 1
await user.timeline.fetchUpToPage(pageIndex)