Skip to content

Commit

Permalink
fix: rev status list to rev list
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Bluhm <dbluhm@pm.me>
  • Loading branch information
dbluhm committed Apr 27, 2023
1 parent 6043173 commit 1178edf
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion aries_cloudagent/anoncreds/models/anoncreds_revocation.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ class RevList(BaseModel):
class Meta:
"""RevList metadata."""

schema_class = "RevStatusListSchema"
schema_class = "RevListSchema"

def __init__(
self,
Expand Down
12 changes: 6 additions & 6 deletions aries_cloudagent/anoncreds/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
from .models.anoncreds_cred_def import CredDefResultSchema, GetCredDefResultSchema
from .models.anoncreds_revocation import (
RevRegDefResultSchema,
RevStatusListResultSchema,
RevListResultSchema,
)
from .models.anoncreds_schema import (
AnonCredsSchemaSchema,
Expand Down Expand Up @@ -390,7 +390,7 @@ async def rev_reg_def_post(request: web.BaseRequest):
return web.json_response(result.serialize())


class RevStatusListCreateRequestSchema(OpenAPISchema):
class RevListCreateRequestSchema(OpenAPISchema):
"""Request schema for revocation registry creation request."""

rev_reg_def_id = fields.Str(
Expand All @@ -400,9 +400,9 @@ class RevStatusListCreateRequestSchema(OpenAPISchema):


@docs(tags=["anoncreds"], summary="")
@request_schema(RevStatusListCreateRequestSchema())
@response_schema(RevStatusListResultSchema(), 200, description="")
async def rev_status_list_post(request: web.BaseRequest):
@request_schema(RevListCreateRequestSchema())
@response_schema(RevListResultSchema(), 200, description="")
async def rev_list_post(request: web.BaseRequest):
"""Request handler for creating .
Args:
Expand Down Expand Up @@ -463,7 +463,7 @@ async def register(app: web.Application):
allow_head=False,
),
web.post("/anoncreds/revocation-registry-definition", rev_reg_def_post),
web.post("/anoncreds/revocation-status-list", rev_status_list_post),
web.post("/anoncreds/revocation-status-list", rev_list_post),
]
)

Expand Down
8 changes: 4 additions & 4 deletions aries_cloudagent/revocation/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,8 @@ async def revoke_credential(
txn, issuer_rr_rec.record_id, for_update=True
)
if prev:
issuer_rr_upd.prev_status_list = prev
issuer_rr_upd.rev_status_list = curr
issuer_rr_upd.prev_list = prev
issuer_rr_upd.rev_list = curr
await issuer_rr_upd.clear_pending(txn, crids)
await txn.commit()
await self.set_cred_revoked_state(rev_reg_id, crids)
Expand Down Expand Up @@ -235,8 +235,8 @@ async def publish_pending_revocations(
txn, issuer_rr_rec.record_id, for_update=True
)
if prev:
issuer_rr_upd.prev_status_list = prev
issuer_rr_upd.rev_status_list = curr
issuer_rr_upd.prev_list = prev
issuer_rr_upd.rev_list = curr
await issuer_rr_upd.clear_pending(txn, crids)
await txn.commit()
await self.set_cred_revoked_state(issuer_rr_rec.revoc_reg_id, crids)
Expand Down

0 comments on commit 1178edf

Please sign in to comment.