import json

import webapp2
from google.appengine.api import users
import model


DEBUG = False


class Action(webapp2.RequestHandler):

    def post(self):
        action_type = self.request.path[len('/api/action/'):]
        request = json.loads(self.request.body)
        model.create_action(action_type, self.request.remote_addr, request)

    def get(self):
        if self.request.get('key') == "bananinha":
            self.response.headers['Content-Type'] = 'application/json'
            self.response.write(model.get_actions())
        else:
            self.response.set_status(401)


app = webapp2.WSGIApplication([
    ('/api/action/.*', Action),
], debug=DEBUG)

1cd9431d024b739d3f13e459a693091885a79a38
<mask token>


class Action(webapp2.RequestHandler):
    <mask token>

    def get(self):
        if self.request.get('key') == 'bananinha':
            self.response.headers['Content-Type'] = 'application/json'
            self.response.write(model.get_actions())
        else:
            self.response.set_status(401)


<mask token>

<mask token>


class Action(webapp2.RequestHandler):

    def post(self):
        action_type = self.request.path[len('/api/action/'):]
        request = json.loads(self.request.body)
        model.create_action(action_type, self.request.remote_addr, request)

    def get(self):
        if self.request.get('key') == 'bananinha':
            self.response.headers['Content-Type'] = 'application/json'
            self.response.write(model.get_actions())
        else:
            self.response.set_status(401)


<mask token>

<mask token>
DEBUG = False


class Action(webapp2.RequestHandler):

    def post(self):
        action_type = self.request.path[len('/api/action/'):]
        request = json.loads(self.request.body)
        model.create_action(action_type, self.request.remote_addr, request)

    def get(self):
        if self.request.get('key') == 'bananinha':
            self.response.headers['Content-Type'] = 'application/json'
            self.response.write(model.get_actions())
        else:
            self.response.set_status(401)


app = webapp2.WSGIApplication([('/api/action/.*', Action)], debug=DEBUG)

import json
import webapp2
from google.appengine.api import users
import model
DEBUG = False


class Action(webapp2.RequestHandler):

    def post(self):
        action_type = self.request.path[len('/api/action/'):]
        request = json.loads(self.request.body)
        model.create_action(action_type, self.request.remote_addr, request)

    def get(self):
        if self.request.get('key') == 'bananinha':
            self.response.headers['Content-Type'] = 'application/json'
            self.response.write(model.get_actions())
        else:
            self.response.set_status(401)


app = webapp2.WSGIApplication([('/api/action/.*', Action)], debug=DEBUG)

import json

import webapp2
from google.appengine.api import users
import model


DEBUG = False


class Action(webapp2.RequestHandler):

    def post(self):
        action_type = self.request.path[len('/api/action/'):]
        request = json.loads(self.request.body)
        model.create_action(action_type, self.request.remote_addr, request)

    def get(self):
        if self.request.get('key') == "bananinha":
            self.response.headers['Content-Type'] = 'application/json'
            self.response.write(model.get_actions())
        else:
            self.response.set_status(401)


app = webapp2.WSGIApplication([
    ('/api/action/.*', Action),
], debug=DEBUG)
