Package controllers.api

Source Code of controllers.api.ApiInterests

package controllers.api;

import models.Interest;
import play.mvc.Controller;

import java.util.List;

public class ApiInterests extends JsonpController {

    public static void list() {
        List<Interest> interests = Interest.findAllOrdered();
        renderJSON(interests);
    }

    public static void interest(long id) {
        Interest interest = Interest.findById(id);
        notFoundIfNull(interest);
        renderJSON(interest);
    }
}
TOP

Related Classes of controllers.api.ApiInterests

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.