Skip to content

Commit

Permalink
temp payloads endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
JamieScottC committed Dec 7, 2023
1 parent 9c0e9ed commit f6ecbcb
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions app/api/packs/campaign.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from collections import defaultdict

from aiohttp_jinja2 import template
from aiohttp import web

from app.service.auth_svc import check_authorization
from app.utility.base_world import BaseWorld
Expand All @@ -20,6 +21,11 @@ async def enable(self):
self.app_svc.application.router.add_route('GET', '/campaign/abilities', self._section_abilities)
self.app_svc.application.router.add_route('GET', '/campaign/adversaries', self._section_profiles)
self.app_svc.application.router.add_route('GET', '/campaign/operations', self._section_operations)
self.app_svc.application.router.add_route('GET', '/api/payloads', self.get_payloads)

async def get_payloads(self, request):
payloads = list(await self.rest_svc.list_payloads())
return web.json_response(dict(payloads=payloads))

@check_authorization
@template('agents.html')
Expand Down

0 comments on commit f6ecbcb

Please sign in to comment.