File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
application/controllers/api Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -233,15 +233,15 @@ private function _generate_key()
233233
234234 private function _get_key ($ key )
235235 {
236- return $ this ->db
236+ return $ this ->rest -> db
237237 ->where (config_item ('rest_key_column ' ), $ key )
238238 ->get (config_item ('rest_keys_table ' ))
239239 ->row ();
240240 }
241241
242242 private function _key_exists ($ key )
243243 {
244- return $ this ->db
244+ return $ this ->rest -> db
245245 ->where (config_item ('rest_key_column ' ), $ key )
246246 ->count_all_results (config_item ('rest_keys_table ' )) > 0 ;
247247 }
@@ -251,21 +251,21 @@ private function _insert_key($key, $data)
251251 $ data [config_item ('rest_key_column ' )] = $ key ;
252252 $ data ['date_created ' ] = function_exists ('now ' ) ? now () : time ();
253253
254- return $ this ->db
254+ return $ this ->rest -> db
255255 ->set ($ data )
256256 ->insert (config_item ('rest_keys_table ' ));
257257 }
258258
259259 private function _update_key ($ key , $ data )
260260 {
261- return $ this ->db
261+ return $ this ->rest -> db
262262 ->where (config_item ('rest_key_column ' ), $ key )
263263 ->update (config_item ('rest_keys_table ' ), $ data );
264264 }
265265
266266 private function _delete_key ($ key )
267267 {
268- return $ this ->db
268+ return $ this ->rest -> db
269269 ->where (config_item ('rest_key_column ' ), $ key )
270270 ->delete (config_item ('rest_keys_table ' ));
271271 }
You can’t perform that action at this time.
0 commit comments