Compare commits
1 Commits
dependabot
...
dependabot
Author | SHA1 | Date | |
---|---|---|---|
|
d3266887f0 |
8
.github/dependabot.yml
vendored
8
.github/dependabot.yml
vendored
@@ -10,6 +10,8 @@ updates:
|
||||
directory: "/api"
|
||||
schedule:
|
||||
interval: "daily"
|
||||
assignees:
|
||||
- "H4CK3R-01"
|
||||
open-pull-requests-limit: 100
|
||||
|
||||
# Bot
|
||||
@@ -17,6 +19,10 @@ updates:
|
||||
directory: "/telegram_bot"
|
||||
schedule:
|
||||
interval: "daily"
|
||||
assignees:
|
||||
- "NormalParameter"
|
||||
- "Rripped"
|
||||
- "FlorianKellermann"
|
||||
open-pull-requests-limit: 100
|
||||
|
||||
# Frontend
|
||||
@@ -24,4 +30,6 @@ updates:
|
||||
directory: "/frontend"
|
||||
schedule:
|
||||
interval: "daily"
|
||||
assignees:
|
||||
- "kevinpauer"
|
||||
open-pull-requests-limit: 100
|
||||
|
@@ -4,7 +4,7 @@ uwsgi==2.0.20
|
||||
Flask_SQLAlchemy==2.5.1
|
||||
python-dotenv==0.20.0
|
||||
pymysql==1.0.2
|
||||
pyjwt==2.3.0
|
||||
pyjwt==2.4.0
|
||||
apiflask==1.0.0
|
||||
flask-cors==3.0.10
|
||||
bcrypt==3.2.2
|
||||
|
42
frontend/package-lock.json
generated
42
frontend/package-lock.json
generated
@@ -18,7 +18,7 @@
|
||||
"@angular/platform-browser": "~13.2.0",
|
||||
"@angular/platform-browser-dynamic": "~13.2.0",
|
||||
"@angular/router": "~13.2.0",
|
||||
"bootstrap": "^5.2.1",
|
||||
"bootstrap": "^5.1.3",
|
||||
"ngx-cron-editor": "^0.7.3",
|
||||
"rxjs": "~7.5.0",
|
||||
"tslib": "^2.4.0",
|
||||
@@ -3201,9 +3201,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@popperjs/core": {
|
||||
"version": "2.11.6",
|
||||
"resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.6.tgz",
|
||||
"integrity": "sha512-50/17A98tWUfQ176raKiOGXuYpLyyVMkxxG6oylzL3BPOlA6ADGdK7EYunSa4I064xerltq9TGXs8HmOk5E+vw==",
|
||||
"version": "2.11.5",
|
||||
"resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.5.tgz",
|
||||
"integrity": "sha512-9X2obfABZuDVLCgPK9aX0a/x4jaOEweTTWE2+9sr0Qqqevj2Uv5XorvusThmc9XGYpS9yI+fhh8RTafBtGposw==",
|
||||
"peer": true,
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
@@ -5003,21 +5003,15 @@
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/bootstrap": {
|
||||
"version": "5.2.1",
|
||||
"resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-5.2.1.tgz",
|
||||
"integrity": "sha512-UQi3v2NpVPEi1n35dmRRzBJFlgvWHYwyem6yHhuT6afYF+sziEt46McRbT//kVXZ7b1YUYEVGdXEH74Nx3xzGA==",
|
||||
"funding": [
|
||||
{
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/twbs"
|
||||
},
|
||||
{
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/bootstrap"
|
||||
}
|
||||
],
|
||||
"version": "5.1.3",
|
||||
"resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-5.1.3.tgz",
|
||||
"integrity": "sha512-fcQztozJ8jToQWXxVuEyXWW+dSo8AiXWKwiSSrKWsRB/Qt+Ewwza+JWoLKiTuQLaEPhdNAJ7+Dosc9DOIqNy7Q==",
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/bootstrap"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@popperjs/core": "^2.11.6"
|
||||
"@popperjs/core": "^2.10.2"
|
||||
}
|
||||
},
|
||||
"node_modules/brace-expansion": {
|
||||
@@ -16266,9 +16260,9 @@
|
||||
}
|
||||
},
|
||||
"@popperjs/core": {
|
||||
"version": "2.11.6",
|
||||
"resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.6.tgz",
|
||||
"integrity": "sha512-50/17A98tWUfQ176raKiOGXuYpLyyVMkxxG6oylzL3BPOlA6ADGdK7EYunSa4I064xerltq9TGXs8HmOk5E+vw==",
|
||||
"version": "2.11.5",
|
||||
"resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.5.tgz",
|
||||
"integrity": "sha512-9X2obfABZuDVLCgPK9aX0a/x4jaOEweTTWE2+9sr0Qqqevj2Uv5XorvusThmc9XGYpS9yI+fhh8RTafBtGposw==",
|
||||
"peer": true
|
||||
},
|
||||
"@schematics/angular": {
|
||||
@@ -17542,9 +17536,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"bootstrap": {
|
||||
"version": "5.2.1",
|
||||
"resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-5.2.1.tgz",
|
||||
"integrity": "sha512-UQi3v2NpVPEi1n35dmRRzBJFlgvWHYwyem6yHhuT6afYF+sziEt46McRbT//kVXZ7b1YUYEVGdXEH74Nx3xzGA==",
|
||||
"version": "5.1.3",
|
||||
"resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-5.1.3.tgz",
|
||||
"integrity": "sha512-fcQztozJ8jToQWXxVuEyXWW+dSo8AiXWKwiSSrKWsRB/Qt+Ewwza+JWoLKiTuQLaEPhdNAJ7+Dosc9DOIqNy7Q==",
|
||||
"requires": {}
|
||||
},
|
||||
"brace-expansion": {
|
||||
|
@@ -22,7 +22,7 @@
|
||||
"@angular/platform-browser": "~13.2.0",
|
||||
"@angular/platform-browser-dynamic": "~13.2.0",
|
||||
"@angular/router": "~13.2.0",
|
||||
"bootstrap": "^5.2.1",
|
||||
"bootstrap": "^5.1.3",
|
||||
"ngx-cron-editor": "^0.7.3",
|
||||
"rxjs": "~7.5.0",
|
||||
"tslib": "^2.4.0",
|
||||
|
@@ -208,7 +208,7 @@ def send_status(message):
|
||||
bot.reply_to(message, "bot is running")
|
||||
|
||||
|
||||
@bot.message_handler(commands=['portfolio', 'Portfolio']) # /portfolio -> print all owned shares
|
||||
@bot.message_handler(commands=['portfolio', 'Portfolio']) # /update -> update shares
|
||||
def update_for_user(message):
|
||||
p_user_id = int(message.from_user.id)
|
||||
p_my_handler = api_handler
|
||||
|
@@ -63,13 +63,8 @@ def update_crontab(p_my_handler):
|
||||
|
||||
global user_crontab
|
||||
global user_ids
|
||||
|
||||
all_users = p_my_handler.get_all_users() # get all users so crontabs can update for everybody
|
||||
|
||||
if all_users == None:
|
||||
print("No users found, trying again.")
|
||||
update_crontab(p_my_handler)
|
||||
return
|
||||
|
||||
all_users = p_my_handler.get_all_users() # get all users so crontabs can update for everybody
|
||||
|
||||
user_ids = []
|
||||
user_crontab = []
|
||||
@@ -80,9 +75,10 @@ def update_crontab(p_my_handler):
|
||||
user_ids.append(int(element["telegram_user_id"]))
|
||||
try:
|
||||
user_crontab.append(str(element["cron"]))
|
||||
except:
|
||||
user_ids.pop() # if something goes wrong with cron I have to delete matching user id
|
||||
except: continue
|
||||
except:
|
||||
user_ids.pop() # if something goes wrong with cron I have to delete matching user id
|
||||
except:
|
||||
continue
|
||||
|
||||
print(user_ids)
|
||||
|
||||
@@ -134,23 +130,21 @@ def update_for_user(p_user_id, p_my_handler):
|
||||
"""
|
||||
share_symbols = []
|
||||
share_amounts = []
|
||||
|
||||
my_portfolio = p_my_handler.get_user_portfolio(p_user_id) # get all existing shares for user
|
||||
|
||||
if my_portfolio!=None:
|
||||
for element in my_portfolio:
|
||||
if element["count"] != '' and element["isin"] != '':
|
||||
print(element["count"], element["isin"])
|
||||
share_symbols.append(element["isin"])
|
||||
share_amounts.append(element["count"])
|
||||
my_portfolio = p_my_handler.get_user_portfolio(p_user_id) # get all existing shares for user
|
||||
|
||||
for element in my_portfolio:
|
||||
if element["count"] != '' and element["isin"] != '':
|
||||
print(element["count"], element["isin"])
|
||||
share_symbols.append(element["isin"])
|
||||
share_amounts.append(element["count"])
|
||||
|
||||
my_user = p_my_handler.get_user(p_user_id)
|
||||
send_to_user("Hello %s this is your update for today:"%str(my_user["username"]), pUser_id=p_user_id)
|
||||
|
||||
shares = p_my_handler.get_user_shares(p_user_id) # all interest shares
|
||||
|
||||
if len(share_symbols) != 0: # iterate through all shares
|
||||
send_to_user("Hello %s this is your share update for today:" % str(my_user["username"]), pUser_id=p_user_id)
|
||||
|
||||
shares = p_my_handler.get_user_shares(p_user_id) # all interest shares
|
||||
|
||||
if len(share_symbols) != 0: # iterate through all shares
|
||||
for i in range(len(share_symbols)):
|
||||
my_price = share_fetcher.get_share_price_no_currency(share_symbols[i])
|
||||
my_update_message = f'{share_fetcher.get_share_information_markdown(share_symbols[i])}\ncount: {hf.make_markdown_proof(share_amounts[i])}\nTotal: {hf.make_markdown_proof(round(float(my_price) * float(share_amounts[i]), 2))} EUR'
|
||||
|
Reference in New Issue
Block a user