Angela/protected links #15

Merged
y3332zha merged 0 commits from angela/protected-links into main 2 years ago
y3332zha commented 2 years ago (Migrated from git.uwaterloo.ca)
Owner

Acceptance criteria:

Acceptance criteria: * Create a new POST endpoint that accepts a JSON body in the request * The JSON body should contain one key: links, a list of link objects * This endpoint should be password protected using HTTP auth * Potential library: https://flask-httpauth.readthedocs.io/en/latest/ * Update the DB with the new links (https://docs.python.org/3/library/sqlite3.html
y3332zha commented 2 years ago (Migrated from git.uwaterloo.ca)
Owner

added 5 commits

  • 0107bf4f...3025ffce - 4 commits from branch main
  • e7266e26 - Fix conflicts

Compare with previous version

added 5 commits <ul><li>0107bf4f...3025ffce - 4 commits from branch <code>main</code></li><li>e7266e26 - Fix conflicts</li></ul> [Compare with previous version](/csc/linktree/-/merge_requests/10/diffs?diff_id=51215&start_sha=0107bf4f0bf48c775a732b4e1034ce0128cee86f)
y3332zha commented 2 years ago (Migrated from git.uwaterloo.ca)
Owner

added 1 commit

  • 40e8608f - remove get-pip file

Compare with previous version

added 1 commit <ul><li>40e8608f - remove get-pip file</li></ul> [Compare with previous version](/csc/linktree/-/merge_requests/10/diffs?diff_id=51228&start_sha=e7266e26633cfeeea543b492268d064dfcddbc22)
n3parikh commented 2 years ago (Migrated from git.uwaterloo.ca)
Owner

Can you change this line back to one import per line (as below)? That way, if we need to add or delete an import, the diff will be cleaner.

Can you change this line back to one import per line (as below)? That way, if we need to add or delete an import, the diff will be cleaner.
n3parikh commented 2 years ago (Migrated from git.uwaterloo.ca)
Owner

Can you rename this to something more descriptive?

Can you rename this to something more descriptive?
n3parikh commented 2 years ago (Migrated from git.uwaterloo.ca)
Owner

Before we add the new links, we want to clear the table of the old links.

Before we add the new links, we want to clear the table of the old links.
n3parikh commented 2 years ago (Migrated from git.uwaterloo.ca)
Owner

I'm guessing you installed this using pip install Flask-HTTPAuth. In that case, in the venv, can you run pip freeze > requirements.txt. What that does is add all the currently installed pip modules to the requirements.txt file, to setup on a different machine.

I'm guessing you installed this using `pip install Flask-HTTPAuth`. In that case, in the venv, can you run `pip freeze > requirements.txt`. What that does is add all the currently installed `pip` modules to the `requirements.txt` file, to setup on a different machine.
n3parikh commented 2 years ago (Migrated from git.uwaterloo.ca)
Owner

Can you change the route to /editor/links? Also, you can remove the GET from the methods array from now, so that you can get rid of the if statement in the functions.

Can you change the route to `/editor/links`? Also, you can remove the `GET` from the `methods` array from now, so that you can get rid of the `if` statement in the functions.
y3332zha commented 2 years ago (Migrated from git.uwaterloo.ca)
Owner

changed this line in version 4 of the diff

changed this line in [version 4 of the diff](/csc/linktree/-/merge_requests/10/diffs?diff_id=51567&start_sha=40e8608f083fc0a74fc9fc04cfefdd9655f0ab53#cb368897cc5bf4934e15bc7a3c0b7d3b69446875_4_4)
y3332zha commented 2 years ago (Migrated from git.uwaterloo.ca)
Owner

changed this line in version 4 of the diff

changed this line in [version 4 of the diff](/csc/linktree/-/merge_requests/10/diffs?diff_id=51567&start_sha=40e8608f083fc0a74fc9fc04cfefdd9655f0ab53#cb368897cc5bf4934e15bc7a3c0b7d3b69446875_43_45)
y3332zha commented 2 years ago (Migrated from git.uwaterloo.ca)
Owner

changed this line in version 4 of the diff

changed this line in [version 4 of the diff](/csc/linktree/-/merge_requests/10/diffs?diff_id=51567&start_sha=40e8608f083fc0a74fc9fc04cfefdd9655f0ab53#cb368897cc5bf4934e15bc7a3c0b7d3b69446875_48_45)
y3332zha commented 2 years ago (Migrated from git.uwaterloo.ca)
Owner

changed this line in version 4 of the diff

changed this line in [version 4 of the diff](/csc/linktree/-/merge_requests/10/diffs?diff_id=51567&start_sha=40e8608f083fc0a74fc9fc04cfefdd9655f0ab53#cb368897cc5bf4934e15bc7a3c0b7d3b69446875_41_43)
y3332zha commented 2 years ago (Migrated from git.uwaterloo.ca)
Owner

added 2 commits

  • 08fc9eb3 - 1 commit from branch main
  • 56dd9476 - fix per mr comments

Compare with previous version

added 2 commits <ul><li>08fc9eb3 - 1 commit from branch <code>main</code></li><li>56dd9476 - fix per mr comments</li></ul> [Compare with previous version](/csc/linktree/-/merge_requests/10/diffs?diff_id=51567&start_sha=40e8608f083fc0a74fc9fc04cfefdd9655f0ab53)
y3332zha commented 2 years ago (Migrated from git.uwaterloo.ca)
Owner

added 1 commit

  • fdffae40 - switch to snake case

Compare with previous version

added 1 commit <ul><li>fdffae40 - switch to snake case</li></ul> [Compare with previous version](/csc/linktree/-/merge_requests/10/diffs?diff_id=51568&start_sha=56dd947602fba2d18aa4929b49815fbab299deae)
n3parikh commented 2 years ago (Migrated from git.uwaterloo.ca)
Owner

We should validate the request data, and send a 400 if it's in the wrong format.

We should validate the request data, and send a 400 if it's in the wrong format.
n3parikh commented 2 years ago (Migrated from git.uwaterloo.ca)
Owner

Try grouping the delete and insert into one transaction, so if the insert fails, we don't lose data.

Try grouping the delete and insert into one transaction, so if the insert fails, we don't lose data.
n3parikh commented 2 years ago (Migrated from git.uwaterloo.ca)
Owner

Look into inserting all of them in one sql command (using execute many probably)

Look into inserting all of them in one sql command (using execute many probably)
n3parikh commented 2 years ago (Migrated from git.uwaterloo.ca)
Owner

Remove unused imports.

Remove unused imports.
y3332zha commented 2 years ago (Migrated from git.uwaterloo.ca)
Owner

changed this line in version 6 of the diff

changed this line in [version 6 of the diff](/csc/linktree/-/merge_requests/10/diffs?diff_id=51682&start_sha=fdffae40e3c9d0531b0be0e7683a383fe43c0067#cb368897cc5bf4934e15bc7a3c0b7d3b69446875_51_59)
y3332zha commented 2 years ago (Migrated from git.uwaterloo.ca)
Owner

changed this line in version 6 of the diff

changed this line in [version 6 of the diff](/csc/linktree/-/merge_requests/10/diffs?diff_id=51682&start_sha=fdffae40e3c9d0531b0be0e7683a383fe43c0067#cb368897cc5bf4934e15bc7a3c0b7d3b69446875_49_59)
y3332zha commented 2 years ago (Migrated from git.uwaterloo.ca)
Owner

changed this line in version 6 of the diff

changed this line in [version 6 of the diff](/csc/linktree/-/merge_requests/10/diffs?diff_id=51682&start_sha=fdffae40e3c9d0531b0be0e7683a383fe43c0067#cb368897cc5bf4934e15bc7a3c0b7d3b69446875_58_59)
y3332zha commented 2 years ago (Migrated from git.uwaterloo.ca)
Owner

changed this line in version 6 of the diff

changed this line in [version 6 of the diff](/csc/linktree/-/merge_requests/10/diffs?diff_id=51682&start_sha=fdffae40e3c9d0531b0be0e7683a383fe43c0067#cb368897cc5bf4934e15bc7a3c0b7d3b69446875_1_1)
y3332zha commented 2 years ago (Migrated from git.uwaterloo.ca)
Owner

added 1 commit

  • b8dc8ef3 - more changes per newer pr comments

Compare with previous version

added 1 commit <ul><li>b8dc8ef3 - more changes per newer pr comments</li></ul> [Compare with previous version](/csc/linktree/-/merge_requests/10/diffs?diff_id=51682&start_sha=fdffae40e3c9d0531b0be0e7683a383fe43c0067)
n3parikh commented 2 years ago (Migrated from git.uwaterloo.ca)
Owner

What is this function for?

What is this function for?
n3parikh commented 2 years ago (Migrated from git.uwaterloo.ca)
Owner

You should be generating the file after you update the DB. Right now, the JSON file will have the old data.

You should be generating the file after you update the DB. Right now, the JSON file will have the old data.
y3332zha commented 2 years ago (Migrated from git.uwaterloo.ca)
Owner

changed this line in version 7 of the diff

changed this line in [version 7 of the diff](/csc/linktree/-/merge_requests/10/diffs?diff_id=52089&start_sha=b8dc8ef3fa0190661e8cc347e8022c31ab65b22b#cb368897cc5bf4934e15bc7a3c0b7d3b69446875_42_42)
y3332zha commented 2 years ago (Migrated from git.uwaterloo.ca)
Owner

changed this line in version 7 of the diff

changed this line in [version 7 of the diff](/csc/linktree/-/merge_requests/10/diffs?diff_id=52089&start_sha=b8dc8ef3fa0190661e8cc347e8022c31ab65b22b#cb368897cc5bf4934e15bc7a3c0b7d3b69446875_54_45)
y3332zha commented 2 years ago (Migrated from git.uwaterloo.ca)
Owner

added 1 commit

  • 2562f82f - remove get_posts

Compare with previous version

added 1 commit <ul><li>2562f82f - remove get_posts</li></ul> [Compare with previous version](/csc/linktree/-/merge_requests/10/diffs?diff_id=52089&start_sha=b8dc8ef3fa0190661e8cc347e8022c31ab65b22b)
y3332zha commented 2 years ago (Migrated from git.uwaterloo.ca)
Owner

added 4 commits

  • 2562f82f...b00093bd - 3 commits from branch main
  • cec908e0 - fix merge conflict

Compare with previous version

added 4 commits <ul><li>2562f82f...b00093bd - 3 commits from branch <code>main</code></li><li>cec908e0 - fix merge conflict</li></ul> [Compare with previous version](/csc/linktree/-/merge_requests/10/diffs?diff_id=52091&start_sha=2562f82f66f01b76da513a73525180b362dbdda4)
The pull request has been merged.
Sign in to join this conversation.
No reviewers
No Label deployment
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date

No due date set.

Dependencies

No dependencies set.

Reference: old/LinkList#15
Loading…
There is no content yet.