Skip to content

Commit

Permalink
unify api path style
Browse files Browse the repository at this point in the history
  • Loading branch information
trim21 committed Aug 25, 2024
1 parent c487eba commit 179dfaa
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion server/contrib.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ async def suggest_api(

@router
@litestar.post(
"/api/delete-patch/{patch_id:str}",
"/api/delete-subject/{patch_id:str}",
guards=[require_user_login],
status_code=200,
)
Expand Down
2 changes: 1 addition & 1 deletion server/templates/patch.html.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
<form action="/edit/subject/{{ patch.id }}" method="get" class="col">
<button type="submit" class="btn btn-success">Edit</button>
</form>
<form action="/api/delete-patch/{{ patch.id }}" method="post" class="col">
<form action="/api/delete-subject/{{ patch.id }}" method="post" class="col">
{{ csrf_input | safe }}
<button type="submit" class="btn btn-danger">Delete</button>
</form>
Expand Down

0 comments on commit 179dfaa

Please sign in to comment.