diff options
author | Bernhard Posselt <nukeawhale@gmail.com> | 2013-09-13 18:29:34 +0200 |
---|---|---|
committer | Bernhard Posselt <nukeawhale@gmail.com> | 2013-09-13 18:29:34 +0200 |
commit | 6b138b98a6a92d31263dfcf8075e432f0df40649 (patch) | |
tree | 8f647ec1491de674f3093f24fad21521d25eec01 /appinfo/routes.php | |
parent | e178dc843a677fe2512ebd2247e20016eb18cd5b (diff) |
use before and after update hooks to delete items only after new ones have been fetched
Diffstat (limited to 'appinfo/routes.php')
-rw-r--r-- | appinfo/routes.php | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/appinfo/routes.php b/appinfo/routes.php index fd54794b5..de8f5a47a 100644 --- a/appinfo/routes.php +++ b/appinfo/routes.php @@ -239,9 +239,15 @@ $this->create('news_api_version', '/api/v1-2/version')->get()->action( } ); -$this->create('news_api_cleanup', '/api/v1-2/cleanup')->get()->action( +$this->create('news_api_before_update', '/api/v1-2/cleanup/before-update')->get()->action( function($params) { - return App::main('NewsAPI', 'cleanUp', $params, new DIContainer()); + return App::main('NewsAPI', 'beforeUpdate', $params, new DIContainer()); + } +); + +$this->create('news_api_after_update', '/api/v1-2/cleanup/after-update')->get()->action( + function($params) { + return App::main('NewsAPI', 'afterUpdate', $params, new DIContainer()); } ); |