Added function for deleting API keys

Added a function to delete API keys in the API model, this will be exposed via the api.php controller with a frontend component
pull/302/head
Peter Goodhall 2019-06-21 21:22:22 +01:00
rodzic ab7593fee2
commit caf43f2259
1 zmienionych plików z 4 dodań i 0 usunięć

Wyświetl plik

@ -19,6 +19,10 @@ class API_Model extends CI_Model {
return $this->db->get('api');
}
function delete_key($key) {
$this->db->where('id', $key);
$this->db->delete('api');
}
// Generate API Key
function generate_key($rights) {