Skip to content

Commit b71612a

Browse files
committed
fix issues proposed by reviewer
1 parent 1525c25 commit b71612a

File tree

2 files changed

+6
-42
lines changed

2 files changed

+6
-42
lines changed

config/secrets.exs.example

Lines changed: 0 additions & 28 deletions
This file was deleted.

lib/cadet_web/controllers/user_controller.ex

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -71,29 +71,21 @@ defmodule CadetWeb.UserController do
7171
summary("update user's game states")
7272
security([%{JWT: []}])
7373
consumes("application/json")
74-
produces("application/json")
75-
74+
7675
parameters do
77-
new_game_states(:path, :map, "new game states", required: true)
76+
new_game_states(:body, :map, "new game states", required: true)
7877
end
7978

80-
response(200, "OK", Schema.ref(:UserInfo))
81-
response(201, "Created")
82-
response(204, "No Content")
83-
response(400, "Invalid parameters")
84-
response(401, "Unauthorised")
79+
response(200, "OK")
80+
response(403, "Please try again later.")
8581
end
8682

8783
swagger_path :clear_up_game_states do
8884
put("/user/game_states/clear")
8985
summary("clear up users' game data saved")
9086
security([%{JWT: []}])
91-
consumes("application/json")
92-
produces("application/json")
93-
response(200, "OK", Schema.ref(:UserInfo))
94-
response(201, "Created")
95-
response(204, "No Content")
96-
response(401, "Unauthorised")
87+
response(200, "OK")
88+
response(403, "Please try again later.")
9789
end
9890

9991
def swagger_definitions do

0 commit comments

Comments
 (0)