diff options
-rwxr-xr-x | src/ipcam_server.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/ipcam_server.py b/src/ipcam_server.py index 0e88a56..79b4c54 100755 --- a/src/ipcam_server.py +++ b/src/ipcam_server.py @@ -134,6 +134,7 @@ class IPCamWebServer(http.HTTPServer): self.post('/api/debug/migrate-mtimes', self.debug_migrate_mtimes) self.post('/api/debug/fix', self.debug_fix) + self.post('/api/debug/cleanup', self.debug_cleanup) self.post('/api/timestamp/{name}/{type}', self.set_timestamp) self.post('/api/motion/done/{name}', self.submit_motion) @@ -218,6 +219,10 @@ class IPCamWebServer(http.HTTPServer): asyncio.ensure_future(fix_job()) return self.ok() + async def debug_cleanup(self, req: http.Request): + asyncio.ensure_future(cleanup_job()) + return self.ok() + async def set_timestamp(self, req: http.Request): cam, time_type, time = self._getset_timestamp_params(req, need_time=True) db.set_timestamp(cam, time_type, time) |