Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
gitlab-com
marketo-tools
Commits
ee0cd2c9
Commit
ee0cd2c9
authored
Nov 24, 2015
by
Robert Speicher
Browse files
Merge branch 'rs-routes' into 'master'
Add a basic `/` route; move old `/` route to `/system_hook` See merge request !2
parents
55b219bc
e567280c
Changes
1
Show whitespace changes
Inline
Side-by-side
app.rb
View file @
ee0cd2c9
...
@@ -8,12 +8,16 @@ class MarketoTools < Sinatra::Base
...
@@ -8,12 +8,16 @@ class MarketoTools < Sinatra::Base
username
==
ENV
[
'AUTH_USERNAME'
]
&&
password
==
ENV
[
'AUTH_PASSWORD'
]
username
==
ENV
[
'AUTH_USERNAME'
]
&&
password
==
ENV
[
'AUTH_PASSWORD'
]
end
end
get
'/'
do
'success'
end
# Receives GitLab System Hooks
# Receives GitLab System Hooks
#
#
# Specifically, we're interested in the `user_create` event.
# Specifically, we're interested in the `user_create` event.
#
#
# See http://gitlab.com/help/system_hooks/system_hooks
# See http://gitlab.com/help/system_hooks/system_hooks
post
'/'
do
post
'/
system_hook
'
do
begin
begin
params
=
JSON
.
parse
(
request
.
body
.
read
)
params
=
JSON
.
parse
(
request
.
body
.
read
)
rescue
JSON
::
ParserError
rescue
JSON
::
ParserError
...
...
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