mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-25 18:19:22 +03:00
Added back base for simple plugins hooks
This commit is contained in:
parent
fe4dbc729c
commit
830fa5b753
4 changed files with 57 additions and 1 deletions
|
|
@ -2,6 +2,7 @@ import { Notification } from 'Common/Enums';
|
|||
import { Settings } from 'Common/Globals';
|
||||
import { isArray, pInt, pString } from 'Common/Utils';
|
||||
import { serverRequest } from 'Common/Links';
|
||||
import { runHook } from 'Common/Plugins';
|
||||
|
||||
let iJsonErrorCount = 0,
|
||||
iTokenErrorCount = 0;
|
||||
|
|
@ -92,6 +93,8 @@ export class AbstractFetchRemote
|
|||
abortActions.forEach(actionToAbort => abort(actionToAbort));
|
||||
}
|
||||
|
||||
runHook('json-default-request', [sAction, params, sGetAdd]);
|
||||
|
||||
fetchJSON(sAction, sGetAdd,
|
||||
params,
|
||||
undefined === iTimeout ? 30000 : pInt(iTimeout),
|
||||
|
|
@ -127,6 +130,14 @@ export class AbstractFetchRemote
|
|||
}
|
||||
}
|
||||
|
||||
runHook('json-default-response', [
|
||||
sAction,
|
||||
iError,
|
||||
data,
|
||||
cached,
|
||||
params
|
||||
]);
|
||||
|
||||
fCallback && fCallback(
|
||||
iError,
|
||||
data,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue