Update authentication method for chore script
Some checks failed
/ chores (push) Failing after 12s

Refactor the authentication in the chore script by removing the 'token'
field from the payload and including it in the header as
'Authorization'. This change enhances security practices by aligning
with standard HTTP authorization protocols.
This commit is contained in:
Kumi 2024-02-18 13:23:54 +01:00
parent 623115295a
commit 1df648ca81
Signed by: kumi
GPG key ID: ECBCC9082395383F

View file

@ -29,7 +29,6 @@ CHORES = (
due_date = (datetime.utcnow() + timedelta(days=EXPIRY_DAYS)).isoformat()
payload = {
"token": TOKEN,
"title": "Weekly Chores",
"body": CHORES,
"due_date": due_date,
@ -41,6 +40,7 @@ if ASSIGNEES:
headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "token " + TOKEN,
}
request = urllib.request.Request(