Package controllers

Source Code of controllers.Admin

package controllers;

import models.Album;
import play.mvc.Controller;
import play.mvc.With;

@With(Secure.class)
public class Admin extends Controller {

    /**
     * Log in
     */
    public static void login() {
        Application.list();
    }

    /**
     * Delete album
     *
     * @param id
     */
    @Check("admin")
    public static void delete(Long id) {
        Album album = Album.findById(id);
        album.delete();
        Application.list();
    }

    /**
     * Update album
     *
     * @param id
     */
    @Check("admin")
    public static void form(Long id) {
        Album album = Album.findById(id);
        render("@Application.form", album);
    }


}
TOP

Related Classes of controllers.Admin

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.