| @@ 146-152 (lines=7) @@ | ||
| 143 | * @param int $id |
|
| 144 | * @param string $name |
|
| 145 | */ |
|
| 146 | public function updateName ($id, $newName) { |
|
| 147 | $face = $this->faceMapper->find($id, $this->userId); |
|
| 148 | $face->setName($newName); |
|
| 149 | $face->setDistance(0.0); |
|
| 150 | $newFace = $this->faceMapper->update($face); |
|
| 151 | return new DataResponse($newFace); |
|
| 152 | } |
|
| 153 | ||
| 154 | /** |
|
| 155 | * @NoAdminRequired |
|
| @@ 159-164 (lines=6) @@ | ||
| 156 | * |
|
| 157 | * @param int $id |
|
| 158 | */ |
|
| 159 | public function invalidate($id) { |
|
| 160 | $face = $this->faceMapper->find($id, $this->userId); |
|
| 161 | $note->setDistance(1.0); |
|
| 162 | $newFace = $this->faceMapper->update($face); |
|
| 163 | return new DataResponse($newFace); |
|
| 164 | } |
|
| 165 | ||
| 166 | } |
|
| 167 | ||