whoops i didnt want to commit that yet lol
This commit is contained in:
parent
6804184cf1
commit
a8ad47f830
1 changed files with 0 additions and 13 deletions
|
|
@ -186,19 +186,6 @@ export class MediaWikiClient {
|
|||
return body;
|
||||
}
|
||||
|
||||
async purgePages (titles) {
|
||||
if (!titles.length) return;
|
||||
|
||||
// mediawiki has a 50 title per request limit, so we grab the first 50
|
||||
// and recurse to handle the rest
|
||||
let currentTitles = titles.splice(0, 50);
|
||||
const body = await this.fetchApiPost({
|
||||
action: 'purge',
|
||||
titles: currentTitles.join('|'),
|
||||
});
|
||||
return this.purgePages(titles);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {string} from The page's current name
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue