[SIS-xxx] adding rendering of current Debra donation information

updating for Debra 2023 campaign
adding internal rest api for debra information
adding a debra button to receive information
This commit is contained in:
Sheldan
2023-11-09 01:01:49 +01:00
parent 7449c05462
commit c6f20d617d
73 changed files with 1078 additions and 37 deletions

View File

@@ -0,0 +1,20 @@
import json
from dto import LegacyCredits
def load_all_credits():
with open('settings.json') as warnings:
lines = warnings.read()
credit_obj = json.loads(lines)
user_list = credit_obj['384734293238749']['MEMBER']['297910194841583616']
all_credit_dtos = []
for user in user_list:
user_obj = user_list[user]
dto = LegacyCredits()
dto.credits = user_obj['balance']
dto.user_id = user
all_credit_dtos.append(dto)
print(f'loaded {len(all_credit_dtos)} credit entries.')
return all_credit_dtos