/ucengine/src/controllers/time_controller.erl
Erlang | 30 lines | 9 code | 4 blank | 17 comment | 0 complexity | e20bf648e6f9e954fdc79b0d7cd707c3 MD5 | raw file
- %%
- %% U.C.Engine - Unified Collaboration Engine
- %% Copyright (C) 2011 af83
- %%
- %% This program is free software: you can redistribute it and/or modify
- %% it under the terms of the GNU Affero General Public License as published by
- %% the Free Software Foundation, either version 3 of the License, or
- %% (at your option) any later version.
- %%
- %% This program is distributed in the hope that it will be useful,
- %% but WITHOUT ANY WARRANTY; without even the implied warranty of
- %% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- %% GNU Affero General Public License for more details.
- %%
- %% You should have received a copy of the GNU Affero General Public License
- %% along with this program. If not, see <http://www.gnu.org/licenses/>.
- %%
- -module(time_controller).
- -export([init/0, get/4]).
- -include("uce.hrl").
- init() ->
- [#uce_route{method='GET',
- path=["time"],
- callback={?MODULE, get, []}}].
- get(Domain, _, [], _) ->
- json_helpers:json(Domain, utils:now()).