diff options
| author | Teddy Wing | 2014-06-08 12:19:48 -0400 |
|---|---|---|
| committer | Teddy Wing | 2014-06-08 12:19:48 -0400 |
| commit | bf52bc3a520bff96be32cfb815738660a607f3ab (patch) | |
| tree | 2752aedad137cc8763c3b9e19372ab9bac444afd /app.rb | |
| parent | b41ddb4aa9944057d4dfee5a4b9662dc8326d124 (diff) | |
| download | sellevate-bf52bc3a520bff96be32cfb815738660a607f3ab.tar.bz2 | |
Create JSON route for message list
Create a route to get a list of messages in JSON, tied to a hard-coded
email account for now.
Diffstat (limited to 'app.rb')
| -rw-r--r-- | app.rb | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -1,4 +1,5 @@ require 'sinatra' +require 'sinatra/json' require './fancy_bear/fancy_bear' class App < Sinatra::Base @@ -36,4 +37,9 @@ class App < Sinatra::Base redirect to('/') end + + get '/messages.json' do + contextio = FancyBear::ContextIO::Message.new('sellevate.hack@gmail.com') + json contextio.all + end end |
