Skip to content

Commit 6f5105e

Browse files
committed
Log abuse reports
1 parent 5ddef60 commit 6f5105e

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/model/account/account-store.ts

+10-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,16 @@ export class AccountStore {
2929

3030
constructor(
3131
private goToSettings: () => void
32-
) {}
32+
) {
33+
if (this.user?.subscription?.updateBillingDetailsUrl?.includes('pro-patcher')) {
34+
fetch('https://accounts.httptoolkit.tech/api/log-abuse-report', {
35+
method: 'POST',
36+
headers: { 'content-type': 'application/json' },
37+
body: JSON.stringify(this.user)
38+
});
39+
window.close();
40+
}
41+
}
3342

3443
readonly initialized = lazyObservablePromise(async () => {
3544
// All async auth-related errors at any stage (bad tokens, invalid subscription data,

0 commit comments

Comments
 (0)