Skip to content
This repository has been archived by the owner on Jun 17, 2023. It is now read-only.

fix backend #23

Merged
merged 1 commit into from Oct 5, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions backend/Makefile
Expand Up @@ -3,6 +3,9 @@ REBAR = ./bin/rebar3

all: deps clean compile

deps:
@$(REBAR) deps

clean:
@$(REBAR) clean

Expand Down
2 changes: 1 addition & 1 deletion backend/src/backend.erl
Expand Up @@ -10,7 +10,7 @@ start() ->

stop() ->
Apps = [ ranch, cowboy, backend],
[application:strop(App) || App <- Apps],
[application:stop(App) || App <- Apps],
ok.

restart() ->
Expand Down
2 changes: 0 additions & 2 deletions backend/src/backend_sup.erl
Expand Up @@ -8,8 +8,6 @@

-define(SERVER, ?MODULE).

-define(CHILD(I, Restart, Type), {I, {I, start_link, []}, Restart, 5000, Type, [I]}).

start_link() ->
supervisor:start_link({local, ?SERVER}, ?MODULE, []).

Expand Down
2 changes: 1 addition & 1 deletion backend/src/handlers/games_handler.erl
Expand Up @@ -15,7 +15,7 @@ stream(Msg, Req, State) ->
info({game, opened, GameId}, Req, State) ->
BuildLangs = [ [ {lang, <<"Ruby">>}, {passed, true} ] ],
GameMember = [{username, <<"FirstPlayer">>}, {lang, <<"Ruby">>}],
GameInfo = [{id, GameId}, {challenge_level, 1}, {build_langs, BuildLangs} ],
GameInfo = [{id, GameId}, {challenge_build, [{level, <<"easy">>}]}, {build_langs, BuildLangs} ],
Data = [{game_member, GameMember}, {game, GameInfo}],
Reply = [{handler, gameOpened}, {data, Data}],
{reply, jsx:encode(Reply), Req, State};
Expand Down