Skip to content

Commit 47a05d0

Browse files
committed
small improvements to consistency
1 parent 1d12211 commit 47a05d0

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/officers/urls.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,6 @@ async def all_officers(
104104
@router.get(
105105
"/terms/{computing_id}",
106106
description="""Get term info for an executive. All term info is public for all past or active terms.""",
107-
tags=["login-required"]
108107
)
109108
async def get_officer_terms(
110109
request: Request,
@@ -119,9 +118,8 @@ async def get_officer_terms(
119118
if (
120119
computing_id != session_computing_id
121120
and include_future_terms
122-
and not await WebsiteAdmin.has_permission(db_session, session_computing_id)
123121
):
124-
raise HTTPException(status_code=401)
122+
await WebsiteAdmin.has_permission_or_raise(db_session, session_computing_id)
125123

126124
# all term info is public, so anyone can get any of it
127125
officer_terms = await officers.crud.get_officer_terms(
@@ -136,7 +134,6 @@ async def get_officer_terms(
136134
@router.get(
137135
"/info/{computing_id}",
138136
description="Get officer info for the current user, if they've ever been an exec. Only admins can get info about another user.",
139-
tags=["login-required"]
140137
)
141138
async def get_officer_info(
142139
request: Request,

0 commit comments

Comments
 (0)