1
0
mirror of https://github.com/owncloudarchive/contacts.git synced 2025-01-18 07:52:21 +01:00

Contacts: Add route to trigger indexing

This commit is contained in:
Thomas Tanghus 2013-04-01 03:47:59 +02:00
parent e5fbf0d888
commit c34db99e20

View File

@ -420,3 +420,16 @@ $this->create('contacts_setpreference', 'preference/{user}/set')
}
)
->defaults(array('user' => \OCP\User::getUser()));
$this->create('contacts_index_properties', 'indexproperties/{user}/')
->post()
->action(
function($params) {
session_write_close();
\OC_Hook::emit('OCA\Contacts', 'indexProperties', array());
\OCP\Config::setUserValue($params['user'], 'contacts', 'contacts_properties_indexed', 'yes');
\OCP\JSON::success(array('isIndexed' => true));
}
)
->defaults(array('user' => \OCP\User::getUser()));