Skip to content

Commit

Permalink
Update path for skill check. (#43)
Browse files Browse the repository at this point in the history
Previously the check endpoint was registered as '/check', rather than the expected GET method of '/parse'
  • Loading branch information
snow0x2d0 committed Oct 25, 2021
1 parent f19e79c commit 73d5360
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion webex_skills/api/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def __init__(self, nlp=None, dialogue_manager=None, settings: Optional[BaseSetti

super().__init__(**kwargs, middleware=middleware)
self.router.add_api_route('/parse', self.parse, methods=['POST'], response_model=SkillInvokeResponse)
self.router.add_api_route('/check', self.check, methods=['GET'])
self.router.add_api_route('/parse', self.check, methods=['GET'])

async def parse(self, request: SkillInvokeRequest):
pass
Expand Down
3 changes: 2 additions & 1 deletion webex_skills/cli/skill.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,13 +131,14 @@ def check(
public_key_path: Optional[Path] = typer.Option(
None, '-k', '--key', help="The path of the public key for the skill."
),
url: Optional[str] = typer.Option('http://localhost:8080/check', '-u', help="The check url for the skill."),
url: Optional[str] = typer.Option(None, '-u', help="The check url for the skill."),
):
if name:
# Load details from config
config = get_skill_config(name)
public_key_path = public_key_path or Path(config['public_key_path'])
secret = secret or config['secret']
url = url or config['url']

public_key_text = public_key_path.read_text(encoding='utf-8')
challenge = os.urandom(32).hex()
Expand Down

0 comments on commit 73d5360

Please sign in to comment.