few renames
This commit is contained in:
parent
bca5b2b55c
commit
c0388d58c1
1 changed files with 3 additions and 3 deletions
|
@ -90,19 +90,19 @@ async def remove_device(
|
|||
},
|
||||
response_model=DeviceRead,
|
||||
)
|
||||
async def request_certificate(
|
||||
async def request_certificate_issuance(
|
||||
current_user: User = Depends(get_current_user),
|
||||
device: Device = Depends(get_device_by_id),
|
||||
) -> Device:
|
||||
"""
|
||||
POST ./{device_id}/issue: Request certificate for a device.
|
||||
POST ./{device_id}/issue: Request certificate issuance for a device.
|
||||
"""
|
||||
|
||||
# check permission
|
||||
if not current_user.can_edit(device):
|
||||
raise HTTPException(status_code=status.HTTP_403_FORBIDDEN)
|
||||
|
||||
# cannot request for a newly created device
|
||||
# can only request for a newly created device
|
||||
if device.approved is not None:
|
||||
raise HTTPException(status_code=status.HTTP_409_CONFLICT)
|
||||
|
||||
|
|
Loading…
Reference in a new issue