(request)
| 1111 | |
| 1112 | @routes.post("/queue") |
| 1113 | async def post_queue(request): |
| 1114 | json_data = await request.json() |
| 1115 | if "clear" in json_data: |
| 1116 | if json_data["clear"]: |
| 1117 | self.prompt_queue.wipe_queue() |
| 1118 | if "delete" in json_data: |
| 1119 | to_delete = json_data['delete'] |
| 1120 | for id_to_delete in to_delete: |
| 1121 | delete_func = lambda a: a[1] == id_to_delete |
| 1122 | self.prompt_queue.delete_queue_item(delete_func) |
| 1123 | |
| 1124 | return web.Response(status=200) |
| 1125 | |
| 1126 | @routes.post("/interrupt") |
| 1127 | async def post_interrupt(request): |
nothing calls this directly
no test coverage detected