partial deployment

This commit is contained in:
dbob16 committed 2025-09-28 22:53:09 -04:00
1 parent 9bb763a053
commit 0acfd16d96
13 files changed
+201 -7

No files matched your search

+5 -2
View File
@@ -21,10 +21,13 @@ def get_one_prefix(api_key: str, prefix_name: str):
@prefix_router.post("/")
def post_one_prefix(api_key: str, p: Prefix):
def post_one_prefix(api_key: str, p: Prefix | list[Prefix]):
if not ApiKeyRepo().check_api(api_key):
raise bad_key
rep_detail = PrefixRepo().add_one(p)
if type(p) is list:
rep_detail = PrefixRepo().add_list(p)
elif type(p) is Prefix:
rep_detail = PrefixRepo().add_one(p)
return {"detail": rep_detail}