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:
@@ -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 = {
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user