Remove Patreon functionality (#129)

* Remove Patreon links, supper status checking
* Add warnings to admin panel and README
This commit is contained in:
Eliot Partridge
2019-09-17 17:55:21 -05:00
committed by GitHub
parent 4def56d96c
commit cb5e757fd3
24 changed files with 18 additions and 1127 deletions
-30
View File
@@ -32,13 +32,11 @@ import {
import { accountStatus, accountAround, getServer, getLoginServer, RemovedDocument, accountHidden } from './internal';
import { create } from './reporter';
import { system } from './logger';
import { updatePatreonData, updatePastSupporters } from './polling';
import { AdminService } from './services/adminService';
import { getOriginStats, clearOrigins, removeAllOrigins, removeOrigins, addOrigin, clearOriginsForAccounts } from './api/origins';
import { getDuplicateEntries, getAllDuplicatesQuickInfo, getAllDuplicatesWithInfo } from './api/duplicates';
import { splitAccounts } from './api/merge';
import { removeAuth, assignAuth } from './api/admin-auths';
import { getLastPatreonData } from './patreon';
import { removeFriend, addFriend } from './accountUtils';
@Socket({
@@ -542,34 +540,6 @@ export class AdminServerActions implements IAdminServerActions, SocketServer {
async getDuplicateEntries(force: boolean) {
return await getDuplicateEntries(this.adminService.accounts.items, force);
}
// patreon
@Method({ promise: true })
async updatePatreon() {
await updatePatreonData(this.server, this.settings);
}
@Method({ promise: true })
async resetSupporter(accountId: string) {
await Account.updateOne(
{ _id: accountId },
{ $unset: { supporter: 1, patreon: 1, supporterDeclinedSince: 1 } }).exec();
}
@Method({ promise: true })
async getLastPatreonData() {
const data = await getLastPatreonData();
// if (data) {
// data.pledges.forEach(pledge => {
// const auth = this.adminService.auths.items.find(a => a.openId === pledge.user);
// pledge.account = auth && auth.account;
// });
// }
return data;
}
@Method({ promise: true })
async updatePastSupporters() {
await updatePastSupporters();
}
// other
@Method({ promise: true })
async getTimings(serverId: string) {