@@ -63,7 +63,9 @@ def get_v1_collections_collection_id_categories_count(collectionId, conn=Depends
63
63
JOIN series s
64
64
ON s.id = cs.series_id
65
65
WHERE cs.collection_id = %(collectionId)s
66
- """ , {"collectionId" : collectionId })
66
+ """ , {
67
+ "collectionId" : collectionId
68
+ })
67
69
result = cur .fetchone ()
68
70
if result is None :
69
71
raise HTTPException (status_code = status .HTTP_404_NOT_FOUND )
@@ -116,7 +118,12 @@ def post_v1_categories(body: CreateCategoryDto, conn=Depends(db_connection)):
116
118
, NOW()
117
119
, %(user_id)s
118
120
)
119
- """ , {"name" : body .name , "name_ru" : body .name_ru , "slug" : body .slug , "user_id" : body .user_id })
121
+ """ , {
122
+ "name" : body .name ,
123
+ "name_ru" : body .name_ru ,
124
+ "slug" : body .slug ,
125
+ "user_id" : body .user_id
126
+ })
120
127
finally :
121
128
conn .close ()
122
129
@@ -134,7 +141,9 @@ def get_v1_categories_category_id(categoryId, conn=Depends(db_connection)):
134
141
, slug
135
142
FROM categories
136
143
WHERE id = %(categoryId)s
137
- """ , {"categoryId" : categoryId })
144
+ """ , {
145
+ "categoryId" : categoryId
146
+ })
138
147
result = cur .fetchone ()
139
148
if result is None :
140
149
raise HTTPException (status_code = status .HTTP_404_NOT_FOUND )
@@ -157,7 +166,13 @@ def put_v1_categories_category_id(body: CreateCategoryDto, categoryId, conn=Depe
157
166
, updated_at = NOW()
158
167
, updated_by = %(user_id)s
159
168
WHERE id = %(categoryId)s
160
- """ , {"name" : body .name , "name_ru" : body .name_ru , "slug" : body .slug , "user_id" : body .user_id , "categoryId" : categoryId })
169
+ """ , {
170
+ "name" : body .name ,
171
+ "name_ru" : body .name_ru ,
172
+ "slug" : body .slug ,
173
+ "user_id" : body .user_id ,
174
+ "categoryId" : categoryId
175
+ })
161
176
finally :
162
177
conn .close ()
163
178
@@ -172,6 +187,8 @@ def delete_v1_categories_category_id(categoryId, conn=Depends(db_connection)):
172
187
DELETE
173
188
FROM categories
174
189
WHERE id = %(categoryId)s
175
- """ , {"categoryId" : categoryId })
190
+ """ , {
191
+ "categoryId" : categoryId
192
+ })
176
193
finally :
177
194
conn .close ()
0 commit comments