@@ -79,11 +79,11 @@ |
||
79 | 79 | { |
80 | 80 | $auth = $request->getHeaderLine('Authorization'); |
81 | 81 | if(empty($auth)) |
82 | - { |
|
82 | + { |
|
83 | 83 | $request = $request->withAttribute('user', $this->getUserFromSession()); |
84 | 84 | } |
85 | 85 | else |
86 | - { |
|
86 | + { |
|
87 | 87 | $request = $request->withAttribute('user', $this->getUserFromHeader($auth)); |
88 | 88 | } |
89 | 89 | $response = $next($request, $response); |
@@ -79,11 +79,11 @@ |
||
79 | 79 | { |
80 | 80 | $auth = $request->getHeaderLine('Authorization'); |
81 | 81 | if(empty($auth)) |
82 | - { |
|
82 | + { |
|
83 | 83 | $request = $request->withAttribute('user', $this->getUserFromSession()); |
84 | 84 | } |
85 | 85 | else |
86 | - { |
|
86 | + { |
|
87 | 87 | $request = $request->withAttribute('user', $this->getUserFromHeader($auth)); |
88 | 88 | } |
89 | 89 | $response = $next($request, $response); |
@@ -113,11 +113,11 @@ |
||
113 | 113 | public function delete($filter) |
114 | 114 | { |
115 | 115 | $criteria = $this->getCriteriaFromFilter($filter); |
116 | - $res = $this->collection->remove($criteria, array(), $this->name); |
|
117 | - if($res === true) |
|
118 | - { |
|
116 | + $res = $this->collection->remove($criteria, array(), $this->name); |
|
117 | + if($res === true) |
|
118 | + { |
|
119 | 119 | return true; |
120 | - } |
|
120 | + } |
|
121 | 121 | if($res === false || $res['err'] !== null) |
122 | 122 | { |
123 | 123 | return false; |