Completed
Push — master ( 197620...ce588f )
by Sander
02:30
created
controller/credentialcontroller.php 1 patch
Indentation   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -255,26 +255,26 @@
 block discarded – undo
255 255
 	 * @NoAdminRequired
256 256
 	 */
257 257
 	public function getRevision($credential_guid) {
258
-	    try {
259
-            $credential = $this->credentialService->getCredentialByGUID($credential_guid);
260
-        }
261
-        catch (DoesNotExistException $ex){
262
-            return new NotFoundJSONResponse();
263
-        }
258
+		try {
259
+			$credential = $this->credentialService->getCredentialByGUID($credential_guid);
260
+		}
261
+		catch (DoesNotExistException $ex){
262
+			return new NotFoundJSONResponse();
263
+		}
264 264
 
265
-        // If the request was made by the owner of the credential
266
-        if ($this->userId === $credential->getUserId()) {
267
-            $result = $this->credentialRevisionService->getRevisions($credential->getId(), $this->userId);
268
-        }
269
-        else {
270
-            $acl = $this->sharingService->getACL($this->userId, $credential_guid);
271
-            if ($acl->hasPermission(SharingACL::HISTORY)){
272
-                $result = $this->credentialRevisionService->getRevisions($credential->getId());
273
-            }
274
-            else {
275
-                return new NotFoundJSONResponse();
276
-            }
277
-        }
265
+		// If the request was made by the owner of the credential
266
+		if ($this->userId === $credential->getUserId()) {
267
+			$result = $this->credentialRevisionService->getRevisions($credential->getId(), $this->userId);
268
+		}
269
+		else {
270
+			$acl = $this->sharingService->getACL($this->userId, $credential_guid);
271
+			if ($acl->hasPermission(SharingACL::HISTORY)){
272
+				$result = $this->credentialRevisionService->getRevisions($credential->getId());
273
+			}
274
+			else {
275
+				return new NotFoundJSONResponse();
276
+			}
277
+		}
278 278
 
279 279
 		return new JSONResponse($result);
280 280
 	}
Please login to merge, or discard this patch.