pw update, share logic
parent
9007ddcdf5
commit
63f07e9b9f
|
@ -14,8 +14,7 @@ dbsession = dbsessionmaker()
|
||||||
|
|
||||||
nc = nextcloud_client.Client('https://obzorje.kompot.si')
|
nc = nextcloud_client.Client('https://obzorje.kompot.si')
|
||||||
|
|
||||||
nc.login('gia', 'gia0000!')
|
nc.login(CONFIG['NC_USER'],CONFIG['NC_PASSWORD'])
|
||||||
|
|
||||||
|
|
||||||
l = nc.list("/GIA CLOUD")
|
l = nc.list("/GIA CLOUD")
|
||||||
|
|
||||||
|
@ -27,7 +26,7 @@ for item in l:
|
||||||
|
|
||||||
public_share = nc.share_file_with_link("/GIA CLOUD/"+name)
|
public_share = nc.share_file_with_link("/GIA CLOUD/"+name)
|
||||||
public_link = public_share.get_link()+"/download/"+name
|
public_link = public_share.get_link()+"/download/"+name
|
||||||
card = Card(title=name, interest_rate=-1.0, owner_id=1, item_location=public_link, last_review=None, share_id=0)
|
card = Card(title=name, interest_rate=-1.0, owner_id=1, item_location=public_link, last_review=None, share_id="0")
|
||||||
dbsession.add(card)
|
dbsession.add(card)
|
||||||
dbsession.commit()
|
dbsession.commit()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue