Skip to content

Commit

Permalink
clean up routes
Browse files Browse the repository at this point in the history
  • Loading branch information
diversen7 committed Oct 27, 2023
1 parent ed7bfbe commit 66d0114
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions stadsarkiv_client/endpoints/entities.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@


@is_authenticated(message=translate("You need to be logged in to view this page."), permissions=["employee"])
async def get_entity_create(request: Request):
async def create(request: Request):
try:
schema = await api.schema_get(request)

Expand All @@ -41,7 +41,7 @@ async def get_entity_create(request: Request):


@is_authenticated(message=translate("You need to be logged in to view this page."), permissions=["employee"])
async def get_entity_update(request: Request):
async def update(request: Request):
try:
entity = await api.entity_get(request)

Expand Down Expand Up @@ -83,7 +83,7 @@ async def patch(request: Request):


@is_authenticated(message=translate("You need to be logged in to view this page."), permissions=["employee"])
async def entities_delete_soft(request: Request):
async def delete_soft(request: Request):
if request.method == "POST":
try:
await api.entity_delete_soft(request)
Expand Down
6 changes: 3 additions & 3 deletions stadsarkiv_client/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ def _get_static_dirs() -> list:
Route("/entities", endpoint=entities.post, name="entities_post", methods=["POST"]),
Route("/entities/{uuid:str}", endpoint=entities.get_single, name="entities_get_single", methods=["GET"]),
Route("/entities/{uuid:str}", endpoint=entities.patch, name="entities_patch", methods=["PATCH"]),
Route("/entities/create/{schema_type:str}", endpoint=entities.get_entity_create, name="entity_create"),
Route("/entities/update/{uuid:str}", endpoint=entities.get_entity_update, name="entity_update"),
Route("/entities/delete/{uuid:str}/soft", endpoint=entities.entities_delete_soft, name="entity_delete_soft", methods=["POST", "GET"]),
Route("/entities/create/{schema_type:str}", endpoint=entities.create, name="entities_create"),
Route("/entities/update/{uuid:str}", endpoint=entities.update, name="entities_update"),
Route("/entities/delete/{uuid:str}/soft", endpoint=entities.delete_soft, name="entities_delete_soft", methods=["POST", "GET"]),
Route("/search", endpoint=proxies_search.get, name="proxies_search_get"),
Route("/search/json", endpoint=proxies_search.get_json, name="proxies_search_get_json"),
Route("/records/{record_id:str}", endpoint=proxies_records.get, name="proxies_records_get"),
Expand Down

0 comments on commit 66d0114

Please sign in to comment.