Skip to content

Commit 80b63ba

Browse files
committed
Added '.' where missing
1 parent a8d5012 commit 80b63ba

File tree

3 files changed

+13
-12
lines changed

3 files changed

+13
-12
lines changed

backend/PyMatcha/routes/api/debug.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,12 @@ def debug_confirm_user(uid):
3434
raise NotFoundError("User {} not found".format(uid), "Check the uid and try again")
3535
if u.is_confirmed:
3636
current_app.logger.debug("/debug/users/confirm -> User already confirmed")
37-
return Success("User already confirmed")
37+
return Success("User already confirmed.")
3838
u.is_confirmed = True
3939
u.confirmed_on = datetime.datetime.utcnow()
4040
u.save()
4141
current_app.logger.debug("/debug/users/confirm -> User {} confirmed.".format(u.id))
42-
return Success("User successfully confirmed")
42+
return Success("User successfully confirmed.")
4343

4444

4545
@debug_bp.route("/debug/users/<uid>", methods=["DELETE"])
@@ -53,7 +53,7 @@ def delete_user(uid):
5353
else:
5454
current_app.logger.info("/debug/users/{} -> DELETE user {}".format(uid, uid))
5555
u.delete()
56-
return SuccessDeleted("User {} Deleted".format(uid))
56+
return SuccessDeleted("User {} Deleted.".format(uid))
5757

5858

5959
@debug_bp.route("/debug/views/<int:amount>", methods=["POST"])
@@ -62,7 +62,7 @@ def delete_user(uid):
6262
def create_views(amount):
6363
for i in range(amount):
6464
View.create(profile_id=current_user.id, viewer_id=i)
65-
return Success(f"Added {amount} views to user {current_user.id}")
65+
return Success(f"Added {amount} views to user {current_user.id}.")
6666

6767

6868
@debug_bp.route("/debug/views", methods=["DELETE"])

backend/PyMatcha/utils/mail.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,24 @@
11
import logging
22

33
from flask_mail import Message
4-
5-
from PyMatcha import mail, celery, application
4+
from PyMatcha import application
5+
from PyMatcha import celery
6+
from PyMatcha import mail
67

78

89
@celery.task
910
def send_mail_text(dest: str, subject: str, body: str, sender: str = "pymatcha@gmail.com"):
1011
msg = Message(subject=subject, body=body, sender=sender, recipients=[dest])
1112
with application.app_context():
12-
logging.debug("Sending text mail to {}".format(dest))
13+
logging.debug("Sending text mail to {}.".format(dest))
1314
mail.send(msg)
14-
return "Mail sent successfully to {}".format(dest)
15+
return "Mail sent successfully to {}.".format(dest)
1516

1617

1718
@celery.task
1819
def send_mail_html(dest: str, subject: str, html: str, sender: str = "pymatcha@gmail.com"):
1920
msg = Message(subject=subject, html=html, sender=sender, recipients=[dest])
2021
with application.app_context():
21-
logging.debug("Sending HTML mail to {}".format(dest))
22+
logging.debug("Sending HTML mail to {}.".format(dest))
2223
mail.send(msg)
23-
return "Mail sent successfully to {}".format(dest)
24+
return "Mail sent successfully to {}.".format(dest)

backend/PyMatcha/utils/tasks.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,10 @@ def update_offline_users():
7777
online_count += 1
7878
count += 1
7979
logging.debug(
80-
"Updated online status for {} users. {} passed offline and {} passed or stayed online".format(
80+
"Updated online status for {} users. {} passed offline and {} passed or stayed online.".format(
8181
count, offline_count, online_count
8282
)
8383
)
84-
return "Updated online status for {} users. {} passed offline and {} passed or stayed online".format(
84+
return "Updated online status for {} users. {} passed offline and {} passed or stayed online.".format(
8585
count, offline_count, online_count
8686
)

0 commit comments

Comments
 (0)