Distinguish between local and “normal” Sones in FCP handler.
[Sone.git] / src / main / java / net / pterodactylus / sone / fcp / LockSoneCommand.java
index 5cad8ca..e877a74 100644 (file)
@@ -18,7 +18,7 @@
 package net.pterodactylus.sone.fcp;
 
 import net.pterodactylus.sone.core.Core;
-import net.pterodactylus.sone.data.Sone;
+import net.pterodactylus.sone.data.LocalSone;
 import net.pterodactylus.sone.freenet.SimpleFieldSetBuilder;
 import net.pterodactylus.sone.freenet.fcp.FcpException;
 
@@ -52,7 +52,7 @@ public class LockSoneCommand extends AbstractSoneCommand {
 
        @Override
        public Response execute(SimpleFieldSet parameters, Bucket data, AccessType accessType) throws FcpException {
-               Optional<Sone> sone = getSone(parameters, "Sone", true, true);
+               Optional<LocalSone> sone = getLocalSone(parameters, "Sone", true);
                getCore().lockSone(sone.get());
                return new Response("SoneLocked", new SimpleFieldSetBuilder().put("Sone", sone.get().getId()).get());
        }