16
16
alchemyConverter ,
17
17
)
18
18
19
- # from flask_cognito_lib.decorators import auth_required
19
+ from flask_cognito_lib .decorators import auth_required
20
20
21
21
ticket_bp = Blueprint ("ticket_bp" , __name__ , url_prefix = "ticket" )
22
22
56
56
57
57
58
58
@ticket_bp .route ("/status/<status>" , methods = ["GET" ])
59
- # @auth_required()
59
+ @auth_required ()
60
60
def ticket_get_all_with_status (status ): # create ticket
61
61
62
62
limit = 5000 if "limit" not in request .args else request .args ["limit" ]
@@ -80,7 +80,7 @@ def ticket_get_all_with_status(status): # create ticket
80
80
81
81
82
82
@ticket_bp .route ("/" , methods = ["POST" ])
83
- # @auth_required()
83
+ @auth_required ()
84
84
def ticket_post (): # create ticket
85
85
print ("Creating ticket from the following JSON:" )
86
86
print (request .data )
@@ -98,7 +98,7 @@ def ticket_post(): # create ticket
98
98
99
99
# TODO fix primary key issue, ticketeventID needs to be unique for edits
100
100
@ticket_bp .route ("/<ticket_id>" , methods = ["POST" ])
101
- # @auth_required()
101
+ @auth_required ()
102
102
def ticket_edit (ticket_id ): # create ticket
103
103
print ("Creating ticket from the following JSON:" )
104
104
print (request .data )
@@ -155,7 +155,7 @@ def default_end():
155
155
156
156
157
157
@ticket_bp .route ("/" , methods = ["GET" ])
158
- # @auth_required()
158
+ @auth_required ()
159
159
def ticket_get_all ():
160
160
filters = request .args or {}
161
161
sql_filters = get_clean_filters_dict (filters )
@@ -192,7 +192,7 @@ def get_single(ticket_id):
192
192
return data [0 ] if isinstance (data , list ) else data
193
193
194
194
@ticket_bp .route ("/<ticket_id>" , methods = ["GET" ])
195
- # @auth_required()
195
+ @auth_required ()
196
196
def ticket_get (ticket_id ):
197
197
data = get_single (ticket_id )
198
198
res = alchemyConverter (data )
0 commit comments