mirror of
https://github.com/wekan/wekan.git
synced 2025-04-20 12:07:11 -04:00
REST API: Fix typos, remove extra code.
Thanks to xet7 !
This commit is contained in:
parent
0801e33f97
commit
387f0600ce
1 changed files with 1 additions and 15 deletions
16
api.py
16
api.py
|
@ -133,7 +133,7 @@ at = 'attachment'
|
|||
ats = 'attachments'
|
||||
users = wekanurl + apiusers
|
||||
|
||||
# ------- API URL GERENARTION END -----------
|
||||
# ------- API URL GENERATION END -----------
|
||||
|
||||
# ------- LOGIN TOKEN START -----------
|
||||
|
||||
|
@ -177,20 +177,6 @@ if arguments == 3:
|
|||
print(body.text)
|
||||
# ------- CREATE LIST END -----------
|
||||
|
||||
if sys.argv[1] == 'attachmentjson':
|
||||
|
||||
# ------- ATTACHMENT AS JSON BASE64 START -----------
|
||||
boardid = sys.argv[2]
|
||||
attachmentid = sys.argv[3]
|
||||
attachmentjson = wekanurl + apiboards + boardid + s + ats + s + attachmentid
|
||||
print(attachmentjson)
|
||||
headers = {'Accept': 'application/json', 'Authorization': 'Bearer {}'.format(apikey)}
|
||||
print("=== ATTACHMENT AS JSON BASE64 ===\n")
|
||||
body = requests.get(attachmentjson, headers=headers)
|
||||
data2 = body.text.replace('}',"}\n")
|
||||
print(data2)
|
||||
# ------- ATTACHMENT AS JSON BASE64 END -----------
|
||||
|
||||
if arguments == 2:
|
||||
|
||||
# ------- BOARDS LIST START -----------
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue