Skip to content

Commit

Permalink
fix permission
Browse files Browse the repository at this point in the history
  • Loading branch information
trim21 committed Aug 22, 2024
1 parent 5a14b2f commit ac9cf77
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions server/contrib.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from uuid6 import uuid7

from config import TURNSTILE_SECRET_KEY, TURNSTILE_SITE_KEY, UTC
from server.auth import require_user_editor, require_user_login
from server.auth import require_user_login
from server.base import AuthorizedRequest, BadRequestException, Request, http_client, pg
from server.model import Patch, Wiki
from server.router import Router
Expand Down Expand Up @@ -58,7 +58,7 @@ class CreateSuggestion:


@router
@litestar.post("/suggest", guards=[require_user_editor])
@litestar.post("/suggest", guards=[require_user_login])
async def suggest_api(
subject_id: int,
data: Annotated[CreateSuggestion, Body(media_type=RequestEncodingType.URL_ENCODED)],
Expand Down Expand Up @@ -160,7 +160,7 @@ async def delete_patch(patch_id: str, request: AuthorizedRequest) -> Redirect:
raise NotAuthorizedException

await conn.execute(
"update patch set deleted_at = $1 where id = $2 ",
"update patch set deleted_at = $1 where id = $2",
datetime.now(tz=UTC),
patch_id,
)
Expand Down

0 comments on commit ac9cf77

Please sign in to comment.