Skip to content

Commit

Permalink
🎨
Browse files Browse the repository at this point in the history
  • Loading branch information
cl0ete committed Feb 1, 2024
1 parent 9050be1 commit c15bf74
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
8 changes: 5 additions & 3 deletions app/models/issuer.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,13 @@ class RevokeCredential(BaseModel):

class PublishRevocations(BaseModel):
rrid2crid: Dict[str, Optional[List[str]]] = Field(
description="A map of revocation registry ids to credential exchange ids. The credential exchange ids are optional if you want to publish all for a given revocation registry id.",
description="A map of revocation registry ids to credential exchange ids. \
The credential exchange ids are optional if you want to publish all for a given revocation registry id.",
)


class ClearPendingRevocationsRequest(BaseModel):
purge: Optional[Dict[str,List[str]]] = Field(
description="A map of revocation registry ids to credential exchange ids to clear pending revocations for. If not provided, all pending revocations will be clearedor if empty list provided clears all pending revocations for registry id.",
purge: Optional[Dict[str, List[str]]] = Field(
description="A map of revocation registry ids to credential exchange ids to clear pending revocations for.\
If not provided, all pending revocations will be clearedor if empty list provided clears all pending revocations for registry id.",

Check warning

Code scanning / Pylintpython3 (reported by Codacy)

Line too long (141/120) Warning

Line too long (141/120)
)
3 changes: 2 additions & 1 deletion app/routes/issuer.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ async def publish_revocations(
Parameters:
-----------
revocation_registry_id: [credential_exchange_id: str]
A map of revocation registry ids to credential exchange ids.
A map of revocation registry ids to credential exchange ids.
Returns:
--------
Expand Down Expand Up @@ -347,6 +347,7 @@ async def clear_pending_revocations(
bound_logger.info("Successfully cleared pending revocations.")
return result


@router.get("/revocation/record", response_model=IssuerCredRevRecord)
async def get_credential_revocation_record(
credential_exchange_id: Optional[str] = None,
Expand Down
5 changes: 3 additions & 2 deletions app/services/revocation_registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
ApiException,
ClearPendingRevocationsRequest,
CredRevRecordResult,
PublishRevocations,
IssuerCredRevRecord,
IssuerRevRegRecord,
PublishRevocations,
RevokeRequest,
RevRegCreateRequest,
RevRegResult,
Expand Down Expand Up @@ -364,7 +364,7 @@ async def clear_pending_revocations(
controller (AcaPyClient): aca-py client
purge (ClearPendingRevocationsRequest): The revocation registry ID.
Raises:
Raises:
Exception: When the pending revocations could not be cleared
"""
Expand All @@ -386,6 +386,7 @@ async def clear_pending_revocations(
bound_logger.info("Successfully cleared pending revocations.")
return result


async def get_credential_revocation_record(
controller: AcaPyClient,
credential_exchange_id: str,
Expand Down

0 comments on commit c15bf74

Please sign in to comment.