If no current Sone exists, return an error.
[Sone.git] / src / main / java / net / pterodactylus / sone / web / ajax / DismissNotificationAjaxPage.java
index 08e3ee5..d8d5cf7 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Sone - DismissNotificationAjaxPage.java - Copyright © 2010 David Roden
+ * Sone - DismissNotificationAjaxPage.java - Copyright © 2010–2013 David Roden
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -18,7 +18,7 @@
 package net.pterodactylus.sone.web.ajax;
 
 import net.pterodactylus.sone.web.WebInterface;
-import net.pterodactylus.util.json.JsonObject;
+import net.pterodactylus.sone.web.page.FreenetRequest;
 import net.pterodactylus.util.notify.Notification;
 
 /**
@@ -38,11 +38,8 @@ public class DismissNotificationAjaxPage extends JsonPage {
                super("dismissNotification.ajax", webInterface);
        }
 
-       /**
-        * {@inheritDoc}
-        */
        @Override
-       protected JsonObject createJsonObject(Request request) {
+       protected JsonReturnObject createJsonObject(FreenetRequest request) {
                String notificationId = request.getHttpRequest().getParam("notification");
                Notification notification = webInterface.getNotifications().getNotification(notificationId);
                if (notification == null) {
@@ -55,9 +52,6 @@ public class DismissNotificationAjaxPage extends JsonPage {
                return createSuccessJsonObject();
        }
 
-       /**
-        * {@inheritDoc}
-        */
        @Override
        protected boolean requiresLogin() {
                return false;