Skip to content

Commit

Permalink
resolve merge conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
rodolfomiranda committed Jul 11, 2024
1 parent 2453bdd commit f1557fe
Showing 1 changed file with 0 additions and 36 deletions.
36 changes: 0 additions & 36 deletions src/keria/app/aiding.py
Original file line number Diff line number Diff line change
Expand Up @@ -747,42 +747,6 @@ def on_put(self, req, rep, name):
rep.content_type = "application/json"
rep.data = json.dumps(data).encode("utf-8")

def on_delete(self, req, rep, name):
"""Identifier delete endpoint
Parameters:
req (Request): falcon.Request HTTP request object
rep (Response): falcon.Response HTTP response object
name (str): human-readable name or prefix for Hab to delete
---
summary: Delete an identifier.
description: This endpoint deletes an identifier by its name or prefix.
tags:
- Identifier
parameters:
- in: path
name: name or prefix
schema:
type: string
required: true
description: The human-readable name of the identifier or its prefix.
responses:
200:
description: Successfully deleted the identifier.
400:
description: Bad request. This could be due to a missing or invalid name parameter.
404:
description: The requested identifier was not found.
"""
if not name:
raise falcon.HTTPBadRequest(description="name is required")
agent = req.context.agent
hab = agent.hby.habs[name] if name in agent.hby.habs else agent.hby.habByName(name)
if hab is None:
raise falcon.HTTPNotFound(title=f"No AID with name or prefix {name} found")
agent.hby.deleteHab(name)
rep.status = falcon.HTTP_200

def on_post(self, req, rep, name):
"""Identifier events endpoint
Expand Down

0 comments on commit f1557fe

Please sign in to comment.