示例#1
0
文件: Request.php 项目: jiak94/api
 public function cancelRequest($requestId, $token)
 {
     $rs = array();
     $requestId = intval($requestId);
     $model = new Model_Request();
     $rs = $model->cancelRequest($requestId, $token);
     return $rs;
 }
示例#2
0
 public function action_delete($id = null)
 {
     is_null($id) and Response::redirect('request');
     if ($request = Model_Request::find($id)) {
         $request->delete();
         Session::set_flash('success', 'Deleted request #' . $id);
     } else {
         Session::set_flash('error', 'Could not delete request #' . $id);
     }
     Response::redirect('request');
 }