On manually rescraping a user feed, update the user and download their content too
This commit is contained in:
parent
cd02110021
commit
eec02fef00
@ -46,6 +46,12 @@ func (app *Application) UserFeed(w http.ResponseWriter, r *http.Request) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Update the user themself
|
||||||
|
user, err = app.API.GetUser(scraper.UserHandle(parts[0]))
|
||||||
|
panic_if(err)
|
||||||
|
panic_if(app.Profile.SaveUser(&user)) // TODO: handle conflicting users
|
||||||
|
panic_if(app.Profile.DownloadUserContentFor(&user, &app.API))
|
||||||
|
|
||||||
if len(parts) == 1 { // The URL is just the user handle
|
if len(parts) == 1 { // The URL is just the user handle
|
||||||
// Run scraper
|
// Run scraper
|
||||||
trove, err := app.API.GetUserFeed(user.ID, 50) // TODO: parameterizable
|
trove, err := app.API.GetUserFeed(user.ID, 50) // TODO: parameterizable
|
||||||
|
Loading…
x
Reference in New Issue
Block a user