Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Pleroma
pleroma
Commits
a185ea63
Commit
a185ea63
authored
Apr 17, 2017
by
lain
Browse files
Merge branch 'develop' of ssh.gitgud.io:lambadalambda/pleroma into develop
parents
6bfd5219
9a8f05e9
Changes
3
Hide whitespace changes
Inline
Side-by-side
lib/pleroma/web/router.ex
View file @
a185ea63
...
...
@@ -21,6 +21,8 @@ def user_fetcher(username) do
scope
"/api"
,
Pleroma
.
Web
do
pipe_through
:api
get
"/help/test"
,
TwitterAPI
.
Controller
,
:help_test
get
"/statuses/public_timeline"
,
TwitterAPI
.
Controller
,
:public_timeline
get
"/statuses/public_and_external_timeline"
,
TwitterAPI
.
Controller
,
:public_timeline
get
"/statuses/show/:id"
,
TwitterAPI
.
Controller
,
:fetch_status
...
...
lib/pleroma/web/twitter_api/twitter_api_controller.ex
View file @
a185ea63
...
...
@@ -85,6 +85,10 @@ def upload(conn, %{"media" => media}) do
|>
send_resp
(
200
,
response
)
end
def
help_test
(
conn
,
_params
)
do
conn
|>
json_reply
(
200
,
Poison
.
encode!
(
"ok"
))
end
def
upload_json
(
conn
,
%{
"media"
=>
media
})
do
response
=
TwitterAPI
.
upload
(
media
,
"json"
)
conn
...
...
test/web/twitter_api/twitter_api_controller_test.exs
View file @
a185ea63
...
...
@@ -157,6 +157,12 @@ test "with credentials", %{conn: conn, user: current_user} do
end
end
describe
"GET /help/test.json"
do
test
"returns
\"
ok
\"
"
,
%{
conn:
conn
}
do
conn
=
get
conn
,
"/api/help/test.json"
assert
json_response
(
conn
,
200
)
==
"ok"
end
describe
"POST /api/qvitter/update_avatar.json"
do
setup
[
:valid_user
]
test
"without valid credentials"
,
%{
conn:
conn
}
do
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment