-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbase.py
19 lines (13 loc) · 833 Bytes
/
base.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
from bucketlist import api, app, db
from bucketlist.resources.user_authentication import Register, Login
from bucketlist.resources.bucketlists import BucketListAPI, BucketListsAPI
from bucketlist.resources.bucketlistitems import BucketListItems
""" Defining the API endpoints """
api.add_resource(Register, '/auth/register', endpoint='Register')
api.add_resource(Login, '/auth/login', endpoint='Login')
api.add_resource(BucketListAPI, '/bucketlists/<int:list_id>', endpoint='Bucketlists')
api.add_resource(BucketListsAPI, '/bucketlists/', endpoint='Bucketlistsedit')
api.add_resource(BucketListItems, '/bucketlists/<int:item_id>/items/', endpoint='BucketlistItems')
api.add_resource(BucketListItems, '/bucketlists/<int:bucketlist_id>/items/<int:item_id>', endpoint='updatedeleteitems')
if __name__ == "__main__":
app.run()