Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
CS123-Canteeneo
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Willard Torres
CS123-Canteeneo
Commits
1bc3b7fe
Commit
1bc3b7fe
authored
Nov 23, 2016
by
Willard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove api/all endpoint temporarily
parent
78feea0e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
24 deletions
+0
-24
api.py
canteeneo/api.py
+0
-24
No files found.
canteeneo/api.py
View file @
1bc3b7fe
...
...
@@ -20,30 +20,6 @@ def cuisines():
data
=
[{
'id'
:
cuisine
.
id
,
'name'
:
cuisine
.
name
}
for
cuisine
in
DishCuisine
.
query
.
all
()]
return
jsonify
(
data
)
@
app
.
route
(
'/api/all'
)
def
all
():
data
=
{
'update_time'
:
str
(
datetime
.
now
()),
'dishes'
:
[],
'stalls'
:
[],
'locations'
:
[]}
for
dish
in
Dish
.
query
.
all
():
data
[
'dishes'
]
.
append
({
'id'
:
dish
.
id
,
'name'
:
dish
.
name
,
'price'
:
dish
.
price
,
'stall_id'
:
dish
.
stall_id
,
'image_path'
:
dish
.
image_path
})
for
stall
in
Stall
.
query
.
all
():
data
[
'stalls'
]
.
append
({
'id'
:
stall
.
id
,
'name'
:
stall
.
name
})
for
loc
in
Location
.
query
.
all
():
data
[
'locations'
]
.
append
({
'id'
:
loc
.
id
,
'name'
:
loc
.
name
})
return
jsonify
(
**
data
)
@
app
.
route
(
'/api/search/dish'
)
def
search
():
name
=
request
.
args
.
get
(
'name'
)
...
...
Write
Preview
Markdown
is supported
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