Small addition to ts_api.
This commit is contained in:
parent
0d96c26174
commit
b690326cf4
@ -35,12 +35,25 @@ dispatch_request(YArg, [H|T]) ->
|
|||||||
end.
|
end.
|
||||||
|
|
||||||
% no events, show timeline pages
|
% no events, show timeline pages
|
||||||
%dispatch_timeline(_YArg, Username, Timeline, []) ->
|
dispatch_timeline(YArg, Username, Timeline, []) ->
|
||||||
%Req = YArg#arg.arg,
|
Req = YArg#arg.arg,
|
||||||
%HTTPMethod = Req#http_request.method,
|
HTTPMethod = Req#http_request.method,
|
||||||
%
|
|
||||||
%case HTTPMethod of
|
case HTTPMethod of
|
||||||
%'GET' -> list_timelines(Yarg
|
'GET' -> get_timeline(YArg, Username, Timeline);
|
||||||
|
'PUT' -> put_timeline(YArg, Username, Timeline);
|
||||||
|
'POST' -> post_timeline(YArg, Username, Timeline);
|
||||||
|
'DELETE' -> delete_timeline(YArg, Username, Timeline)
|
||||||
|
end;
|
||||||
|
|
||||||
|
dispatch_timeline(YArg, Username, Timeline, [H|T]) ->
|
||||||
|
|
||||||
|
% ============================== %
|
||||||
|
% ======== IMPLEMENTATION ====== %
|
||||||
|
% ============================== %
|
||||||
|
|
||||||
|
get_timeline(YArg, Username, TimelineId) ->
|
||||||
|
Timeline = mnesia:dirty_read(ts_timeline, {Username, TimelineId}).
|
||||||
|
|
||||||
% ============================== %
|
% ============================== %
|
||||||
% ======== UTIL METHODS ======== %
|
% ======== UTIL METHODS ======== %
|
||||||
|
Loading…
x
Reference in New Issue
Block a user