9 lines
290 B
Prolog
9 lines
290 B
Prolog
:- http_handler(root(api/login), login_route, []).
|
|
|
|
% POST /login
|
|
login_route(Request) :-
|
|
member(method(post), Request), !,
|
|
http_read_data(Request, Json, []),
|
|
json_to_prolog(Json, login(Username, Password)),
|
|
handle_login(Username, Password, Reply),
|
|
reply_prolog(Reply).
|