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
fec6a8dc
Commit
fec6a8dc
authored
Oct 27, 2016
by
Willard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add empty functions for favorite and review
parent
b7f0c94f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
0 deletions
+20
-0
api.py
canteeneo/api.py
+20
-0
No files found.
canteeneo/api.py
View file @
fec6a8dc
...
@@ -92,3 +92,23 @@ def verify_token(token):
...
@@ -92,3 +92,23 @@ def verify_token(token):
def
get_auth_token
():
def
get_auth_token
():
token
=
generate_token
(
g
.
user
)
token
=
generate_token
(
g
.
user
)
return
jsonify
({
'token'
:
token
.
decode
(
'ascii'
),
'duration'
:
600
})
return
jsonify
({
'token'
:
token
.
decode
(
'ascii'
),
'duration'
:
600
})
@
app
.
route
(
'/api/dish/<int:dish_id>/favorite'
,
methods
=
[
'POST'
])
@
auth
.
login_required
def
favorite_dish
(
dish_id
):
pass
@
app
.
route
(
'/api/dish/<int:dish_id>/review'
,
methods
=
[
'POST'
])
@
auth
.
login_required
def
review_dish
(
dish_id
):
pass
@
app
.
route
(
'/api/stall/<int:stall_id>/favorite'
,
methods
=
[
'POST'
])
@
auth
.
login_required
def
favorite_stall
(
stall_id
):
pass
@
app
.
route
(
'/api/stall/<int:stall_id>/review'
,
methods
=
[
'POST'
])
@
auth
.
login_required
def
review_stall
(
stall_id
):
pass
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