@@ -26,7 +26,7 @@ def get_v1_categories_count(conn=Depends(db_connection)):
26
26
cur .execute ("SELECT COUNT(*) AS counter FROM categories" )
27
27
result = cur .fetchone ()
28
28
if result is None :
29
- raise HTTPException (status_code = status .HTTP_404_NOT_FOUND )
29
+ raise HTTPException (status_code = status .HTTP_404_NOT_FOUND )
30
30
return result
31
31
finally :
32
32
conn .close ()
@@ -66,7 +66,7 @@ def get_v1_collections_collection_id_categories_count(collectionId, conn=Depends
66
66
""" , {"collectionId" : collectionId })
67
67
result = cur .fetchone ()
68
68
if result is None :
69
- raise HTTPException (status_code = status .HTTP_404_NOT_FOUND )
69
+ raise HTTPException (status_code = status .HTTP_404_NOT_FOUND )
70
70
return result
71
71
finally :
72
72
conn .close ()
@@ -90,7 +90,7 @@ def get_list_v1_categories(conn=Depends(db_connection)):
90
90
conn .close ()
91
91
92
92
93
- @router .post ('/v1/categories' , status_code = status .HTTP_204_NO_CONTENT )
93
+ @router .post ('/v1/categories' , status_code = status .HTTP_204_NO_CONTENT )
94
94
def post_v1_categories (body : CreateCategoryDto , conn = Depends (db_connection )):
95
95
try :
96
96
with conn :
@@ -137,13 +137,13 @@ def get_v1_categories_category_id(categoryId, conn=Depends(db_connection)):
137
137
""" , {"categoryId" : categoryId })
138
138
result = cur .fetchone ()
139
139
if result is None :
140
- raise HTTPException (status_code = status .HTTP_404_NOT_FOUND )
140
+ raise HTTPException (status_code = status .HTTP_404_NOT_FOUND )
141
141
return result
142
142
finally :
143
143
conn .close ()
144
144
145
145
146
- @router .put ('/v1/categories/{categoryId}' , status_code = status .HTTP_204_NO_CONTENT )
146
+ @router .put ('/v1/categories/{categoryId}' , status_code = status .HTTP_204_NO_CONTENT )
147
147
def put_v1_categories_category_id (body : CreateCategoryDto , categoryId , conn = Depends (db_connection )):
148
148
try :
149
149
with conn :
@@ -162,6 +162,6 @@ def put_v1_categories_category_id(body: CreateCategoryDto, categoryId, conn=Depe
162
162
conn .close ()
163
163
164
164
165
- @router .delete ('/v1/categories/{categoryId}' , status_code = status .HTTP_204_NO_CONTENT )
165
+ @router .delete ('/v1/categories/{categoryId}' , status_code = status .HTTP_204_NO_CONTENT )
166
166
def delete_v1_categories_category_id ():
167
167
pass
0 commit comments