Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
969c014
feat: moved advent folder -> puzzles, added some comments
May 22, 2022
a185ac6
merge: merged Ryan's database changes
May 22, 2022
3c6bf1b
feat(docker): start separation of dev and prod builds, add pytest fun…
May 24, 2022
058e55d
feat(docker): added dev/prod to frontend, transition frontend to yarn
May 25, 2022
8b881a3
merge: merged pipfile.lock changes
May 25, 2022
35f53c8
fix: remove .vscode folder
May 25, 2022
1048ded
fix(makefile): restructured makefile a bit
May 25, 2022
f23884d
feat: removed .vscode folder from git
May 26, 2022
af94b47
feat(auth): get rudimentary autotesting in place, created clear_datab…
May 31, 2022
2adacb2
feat(test): added all tests for auth/register
Jun 9, 2022
511b4a1
fix(puzzle): changed blueprint in routes/puzzle.py
Jun 12, 2022
6e89290
fix merge conflict from main
Jun 12, 2022
1ded957
Made some stub code for the user routes
Expressionless-Ball-Thing Jun 20, 2022
b796028
Stub codes
Expressionless-Ball-Thing Jun 23, 2022
814909b
feat(auth): refactored registration system, database connections
Jul 2, 2022
88010fe
fix(auth): minor changes to constructor
Jul 2, 2022
03fb576
feat(auth): implement email verification endpoints
Jul 3, 2022
439491b
feat(test): using fixtures
Jul 3, 2022
9262969
feat(auth): finish autotests, still needs commenting
Jul 4, 2022
3f1aa59
feat(auth): finished writing tests for the most part
Jul 4, 2022
467f9f8
Merge remote-tracking branch 'origin/auth' into user_profile
Expressionless-Ball-Thing Jul 4, 2022
b78afa0
Merged stuff
Expressionless-Ball-Thing Jul 4, 2022
d5f8f83
Merge branch 'auth' into user_profile
Expressionless-Ball-Thing Jul 4, 2022
09fa509
user/stats should be working
Expressionless-Ball-Thing Jul 14, 2022
12f2273
node stuff
Expressionless-Ball-Thing Jul 14, 2022
5080ca2
fixed up some stuff about node
Expressionless-Ball-Thing Jul 14, 2022
16d9e26
profile, stat and set_name implemented
Expressionless-Ball-Thing Jul 20, 2022
ff3f991
Merge branch 'main' of https://github.com/csesoc/story-website into u…
Expressionless-Ball-Thing Jul 20, 2022
e668ab4
merged
Expressionless-Ball-Thing Jul 21, 2022
f0d966b
Merge branch 'main' into user_profile
Expressionless-Ball-Thing Aug 4, 2022
753763b
Merge branch 'main' into user_profile
Expressionless-Ball-Thing Aug 9, 2022
436ca45
fixed a problem about tokens
Expressionless-Ball-Thing Aug 9, 2022
ee6c7ad
improved tests, stub code for password reset
Expressionless-Ball-Thing Aug 10, 2022
58dd731
Merge branch 'main' into user_profile
Expressionless-Ball-Thing Aug 10, 2022
ba2b4d6
update routes
Expressionless-Ball-Thing Aug 12, 2022
fff8939
manual overhaul, weird stuff happening with email
Expressionless-Ball-Thing Aug 12, 2022
946e622
All routes going smoothly
Expressionless-Ball-Thing Aug 26, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion backend/Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion backend/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,4 @@ def create_app(config={}):

if __name__ == "__main__":
app = create_app()
app.run(host="0.0.0.0", port=5001)
app.run(host="0.0.0.0", port=5001)
2 changes: 1 addition & 1 deletion backend/auth/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,4 +141,4 @@ def get(id):
cursor.close()
conn.close()

return User(email, password, id)
return User(email, password, id)
21 changes: 19 additions & 2 deletions backend/common/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,25 @@ def getAllCompetitions():
def updateUsername(username, uid):
query = f"""
update Users
set username = {username}
set username = '{username}'
where uid = {uid};
"""
cur.execute(query)
conn.commit()

def updateEmail(email, uid):
query = f"""
update Users
set email = '{email}'
where uid = {uid};
"""
cur.execute(query)
conn.commit()

def updatePassword(password, uid):
query = f"""
update Users
set password = '{password}'
where uid = {uid};
"""
cur.execute(query)
Expand Down Expand Up @@ -396,4 +414,3 @@ def add_user_with_uid(uid, email, username, password):
"""
cur.execute(query)
conn.commit()

2 changes: 1 addition & 1 deletion backend/common/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ class AccessError(Forbidden):
pass

class InvalidError(InternalServerError):
pass
pass
2 changes: 1 addition & 1 deletion backend/common/redis.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,4 @@ def is_blocked(id):
## GENERAL FUNCTIONS

def clear_redis():
cache.flushdb()
cache.flushdb()
2 changes: 1 addition & 1 deletion backend/models/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,4 +107,4 @@ def get(id):

id, email, github_username, username, password = result

return User(id, email, username, password, github_username)
return User(id, email, username, password, github_username)
2 changes: 1 addition & 1 deletion backend/routes/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,4 +102,4 @@ def logout():
@auth.route("/protected", methods=["POST"])
def protected():
verify_jwt_in_request()
return jsonify({}), 200
return jsonify({}), 200
Loading