From 465da4ef0f6b5c352ad35bae329c8de457c6e8ff Mon Sep 17 00:00:00 2001 From: Bofh Date: Thu, 11 Feb 2021 20:08:05 +0100 Subject: [PATCH] More API improvements --- server.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/server.py b/server.py index caee59b..7e17124 100644 --- a/server.py +++ b/server.py @@ -117,12 +117,19 @@ div.item > div.links > div:nth-child(2) > a { if acc_id == '*': if False: pass + elif action == 'update': igmirror.update_allaccounts_async() + return echo(self, {'status': 'ok', 'message': 'All accounts update asyncronous started!'}) + elif action == 'login': igmirror.pixelfed_loginall_async() + return echo(self, {'status': 'ok', 'message': 'All accounts login asyncronous started!'}) + elif action == 'logout': igmirror.pixelfed_logoutall_async() + return echo(self, {'status': 'ok', 'message': 'All accounts logout asyncronous started!'}) + else: # make sure account name contains only safe characters # i think IG usernames can only have this characters: