apexdevkit 1.4.2__tar.gz → 1.4.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {apexdevkit-1.4.2 → apexdevkit-1.4.3}/PKG-INFO +1 -1
- {apexdevkit-1.4.2 → apexdevkit-1.4.3}/apexdevkit/fastapi/router.py +30 -6
- {apexdevkit-1.4.2 → apexdevkit-1.4.3}/pyproject.toml +1 -1
- {apexdevkit-1.4.2 → apexdevkit-1.4.3}/LICENSE +0 -0
- {apexdevkit-1.4.2 → apexdevkit-1.4.3}/README.md +0 -0
- {apexdevkit-1.4.2 → apexdevkit-1.4.3}/apexdevkit/__init__.py +0 -0
- {apexdevkit-1.4.2 → apexdevkit-1.4.3}/apexdevkit/annotation/__init__.py +0 -0
- {apexdevkit-1.4.2 → apexdevkit-1.4.3}/apexdevkit/annotation/deprecate.py +0 -0
- {apexdevkit-1.4.2 → apexdevkit-1.4.3}/apexdevkit/error.py +0 -0
- {apexdevkit-1.4.2 → apexdevkit-1.4.3}/apexdevkit/fastapi/__init__.py +0 -0
- {apexdevkit-1.4.2 → apexdevkit-1.4.3}/apexdevkit/fastapi/builder.py +0 -0
- {apexdevkit-1.4.2 → apexdevkit-1.4.3}/apexdevkit/fastapi/dependable.py +0 -0
- {apexdevkit-1.4.2 → apexdevkit-1.4.3}/apexdevkit/fastapi/docs.py +0 -0
- {apexdevkit-1.4.2 → apexdevkit-1.4.3}/apexdevkit/fastapi/response.py +0 -0
- {apexdevkit-1.4.2 → apexdevkit-1.4.3}/apexdevkit/fastapi/schema.py +0 -0
- {apexdevkit-1.4.2 → apexdevkit-1.4.3}/apexdevkit/fastapi/service.py +0 -0
- {apexdevkit-1.4.2 → apexdevkit-1.4.3}/apexdevkit/http/__init__.py +0 -0
- {apexdevkit-1.4.2 → apexdevkit-1.4.3}/apexdevkit/http/fake.py +0 -0
- {apexdevkit-1.4.2 → apexdevkit-1.4.3}/apexdevkit/http/fluent.py +0 -0
- {apexdevkit-1.4.2 → apexdevkit-1.4.3}/apexdevkit/http/httpx.py +0 -0
- {apexdevkit-1.4.2 → apexdevkit-1.4.3}/apexdevkit/http/json.py +0 -0
- {apexdevkit-1.4.2 → apexdevkit-1.4.3}/apexdevkit/http/url.py +0 -0
- {apexdevkit-1.4.2 → apexdevkit-1.4.3}/apexdevkit/py.typed +0 -0
- {apexdevkit-1.4.2 → apexdevkit-1.4.3}/apexdevkit/repository/__init__.py +0 -0
- {apexdevkit-1.4.2 → apexdevkit-1.4.3}/apexdevkit/repository/connector.py +0 -0
- {apexdevkit-1.4.2 → apexdevkit-1.4.3}/apexdevkit/repository/database.py +0 -0
- {apexdevkit-1.4.2 → apexdevkit-1.4.3}/apexdevkit/repository/in_memory.py +0 -0
- {apexdevkit-1.4.2 → apexdevkit-1.4.3}/apexdevkit/repository/interface.py +0 -0
- {apexdevkit-1.4.2 → apexdevkit-1.4.3}/apexdevkit/testing/__init__.py +0 -0
- {apexdevkit-1.4.2 → apexdevkit-1.4.3}/apexdevkit/testing/database.py +0 -0
- {apexdevkit-1.4.2 → apexdevkit-1.4.3}/apexdevkit/testing/fake.py +0 -0
- {apexdevkit-1.4.2 → apexdevkit-1.4.3}/apexdevkit/testing/rest.py +0 -0
|
@@ -285,7 +285,12 @@ class RestfulRouter:
|
|
|
285
285
|
parent_id: parent_id_type,
|
|
286
286
|
item_id: id_type,
|
|
287
287
|
) -> _Response:
|
|
288
|
-
|
|
288
|
+
try:
|
|
289
|
+
service = self.infra.with_user(user).with_parent(parent_id).build()
|
|
290
|
+
except DoesNotExistError as e:
|
|
291
|
+
return JSONResponse(
|
|
292
|
+
RestfulResponse(RestfulName(self.parent)).not_found(e), 404
|
|
293
|
+
)
|
|
289
294
|
|
|
290
295
|
try:
|
|
291
296
|
return self.response.found_one(service.read_one(item_id))
|
|
@@ -315,7 +320,12 @@ class RestfulRouter:
|
|
|
315
320
|
user: Annotated[Any, Depends(extract_user)],
|
|
316
321
|
parent_id: parent_id_type,
|
|
317
322
|
) -> _Response:
|
|
318
|
-
|
|
323
|
+
try:
|
|
324
|
+
service = self.infra.with_user(user).with_parent(parent_id).build()
|
|
325
|
+
except DoesNotExistError as e:
|
|
326
|
+
return JSONResponse(
|
|
327
|
+
RestfulResponse(RestfulName(self.parent)).not_found(e), 404
|
|
328
|
+
)
|
|
319
329
|
|
|
320
330
|
return self.response.found_many(list(service.read_all()))
|
|
321
331
|
|
|
@@ -349,8 +359,12 @@ class RestfulRouter:
|
|
|
349
359
|
item_id: id_type,
|
|
350
360
|
updates: update_type,
|
|
351
361
|
) -> _Response:
|
|
352
|
-
|
|
353
|
-
|
|
362
|
+
try:
|
|
363
|
+
service = self.infra.with_user(user).with_parent(parent_id).build()
|
|
364
|
+
except DoesNotExistError as e:
|
|
365
|
+
return JSONResponse(
|
|
366
|
+
RestfulResponse(RestfulName(self.parent)).not_found(e), 404
|
|
367
|
+
)
|
|
354
368
|
try:
|
|
355
369
|
service.update_one(item_id, **updates)
|
|
356
370
|
except DoesNotExistError as e:
|
|
@@ -388,7 +402,12 @@ class RestfulRouter:
|
|
|
388
402
|
parent_id: parent_id_type,
|
|
389
403
|
items: collection_type,
|
|
390
404
|
) -> _Response:
|
|
391
|
-
|
|
405
|
+
try:
|
|
406
|
+
service = self.infra.with_user(user).with_parent(parent_id).build()
|
|
407
|
+
except DoesNotExistError as e:
|
|
408
|
+
return JSONResponse(
|
|
409
|
+
RestfulResponse(RestfulName(self.parent)).not_found(e), 404
|
|
410
|
+
)
|
|
392
411
|
|
|
393
412
|
service.update_many(items)
|
|
394
413
|
|
|
@@ -419,7 +438,12 @@ class RestfulRouter:
|
|
|
419
438
|
parent_id: parent_id_type,
|
|
420
439
|
item_id: id_type,
|
|
421
440
|
) -> _Response:
|
|
422
|
-
|
|
441
|
+
try:
|
|
442
|
+
service = self.infra.with_user(user).with_parent(parent_id).build()
|
|
443
|
+
except DoesNotExistError as e:
|
|
444
|
+
return JSONResponse(
|
|
445
|
+
RestfulResponse(RestfulName(self.parent)).not_found(e), 404
|
|
446
|
+
)
|
|
423
447
|
|
|
424
448
|
try:
|
|
425
449
|
service.delete_one(item_id)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|