Compare commits
No commits in common. "7fd8ca7da77bf928ccba3cc52a55f042d05a0570" and "8cb78cde2edb8c11d25bc268f971be24a9d5dee7" have entirely different histories.
7fd8ca7da7
...
8cb78cde2e
1 changed files with 0 additions and 10 deletions
|
@ -1,10 +0,0 @@
|
||||||
import falcon, json
|
|
||||||
|
|
||||||
class CompaniesResource(object):
|
|
||||||
companies = [{"id": 1, "name": "Company One"}, {"id": 2, "name": "Company Two"}]
|
|
||||||
def on_get(self, req, resp):
|
|
||||||
resp.body = json.dumps(self.companies)
|
|
||||||
|
|
||||||
api = falcon.API()
|
|
||||||
companies_endpoint = CompaniesResource()
|
|
||||||
api.add_route('/companies', companies_endpoint)
|
|
Loading…
Add table
Reference in a new issue