Package resources.admin

Source Code of resources.admin.AdminResource

package resources.admin;

import javax.ws.rs.GET;
import javax.ws.rs.Path;

import views.AdminArticlesView;

import models.User;

import com.yammer.dropwizard.auth.Auth;

import daos.ArticleDao;

@Path("/admin")
public class AdminResource {

    private ArticleDao articleDao;

    public AdminResource(ArticleDao articleDao) {
        this.articleDao = articleDao;
    }

    @GET
    public AdminArticlesView index(@Auth User user) {
        return new AdminArticlesView(articleDao.findAll());
    }

}
TOP

Related Classes of resources.admin.AdminResource

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.