package nuclibook.routes;

import spark.Request;
import spark.Response;

/**
 * This class is used when the user doesn't have permission to access a particular page.
 */
public class AccessDeniedRoute extends DefaultRoute {
    /**
     * Redirects the user to the access-denied.html page.
     *
     * @param request  Information sent by the client
     * @param response Information sent to the client
     * @return The rendered template of the page.
     * @throws Exception if something goes wrong, for example, loss of connection with a server
     */
    @Override
    public Object handle(Request request, Response response) throws Exception {
        prepareToHandle(request);
        getRenderer().setTemplateFile("access-denied.html");
        return getRenderer().render();
    }
}

@@ -236,29 +236,41 @@
   * 
-Redirects the user to
+Presents the rendered template of
  the
@@ -289,24 +289,36 @@
 ed.html page
+ to the user
 .%0A     *%0A   

Update AccessDeniedRoute.java