-module(dreki_web_ui_node). -behaviour(cowboy_handler). -behaviour(cowboy_rest). -export([init/2]). -export([allowed_methods/2]). -export([content_types_accepted/2]). -export([content_types_provided/2]). init(Req, State) -> {cowboy_rest, Req, State}. allowed_methods(Req, State) -> {[<<"GET">>, <<"HEAD">>, <<"OPTIONS">>, <<"POST">>], Req, State}. content_types_accepted(Req, State) -> dreki_web:content_types_accepted(Req, State). content_types_provided(Req, State) -> dreki_web:content_types_provided(Req, State). to_html(Req, State) -> Html = dreki_web_ui:render(Req, node, []), {Html, Req, State}.