From f5d5bdfc7ae7ef1852ba523db7c6765f358e3314 Mon Sep 17 00:00:00 2001 From: Jonathan Henson Date: Fri, 20 Nov 2020 22:15:50 +0000 Subject: [PATCH 1/4] - API routes are now registered using blueprints - All routes, including auth, are registered in the register_routes function - Replaced double quotes for single quotes in auth.py for consitency --- .idea/dataSources.local.xml | 17 ++ .idea/dataSources.xml | 11 + .../da25256d-3e6b-489a-be16-36a09f9dc698.xml | 156 ++++++++++++++ .idea/inspectionProfiles/Project_Default.xml | 14 ++ .idea/interview_app.iml | 23 +++ .idea/misc.xml | 4 + .idea/modules.xml | 8 + .idea/vcs.xml | 6 + .idea/workspace.xml | 193 ++++++++++++++++++ jcrm_lite/api/__init__.py | 2 +- jcrm_lite/api/api.py | 50 ++--- jcrm_lite/app.py | 3 - jcrm_lite/auth/__init__.py | 4 +- jcrm_lite/auth/auth.py | 46 ++--- jcrm_lite/routes.py | 6 +- 15 files changed, 486 insertions(+), 57 deletions(-) create mode 100644 .idea/dataSources.local.xml create mode 100644 .idea/dataSources.xml create mode 100644 .idea/dataSources/da25256d-3e6b-489a-be16-36a09f9dc698.xml create mode 100644 .idea/inspectionProfiles/Project_Default.xml create mode 100644 .idea/interview_app.iml create mode 100644 .idea/misc.xml create mode 100644 .idea/modules.xml create mode 100644 .idea/vcs.xml create mode 100644 .idea/workspace.xml diff --git a/.idea/dataSources.local.xml b/.idea/dataSources.local.xml new file mode 100644 index 0000000..b0e5109 --- /dev/null +++ b/.idea/dataSources.local.xml @@ -0,0 +1,17 @@ + + + + + + " + + + no-auth + + + + + + + + \ No newline at end of file diff --git a/.idea/dataSources.xml b/.idea/dataSources.xml new file mode 100644 index 0000000..0f9bd53 --- /dev/null +++ b/.idea/dataSources.xml @@ -0,0 +1,11 @@ + + + + + sqlite.xerial + true + org.sqlite.JDBC + jdbc:sqlite:$PROJECT_DIR$/instance/jcrm_lite.sqlite + + + \ No newline at end of file diff --git a/.idea/dataSources/da25256d-3e6b-489a-be16-36a09f9dc698.xml b/.idea/dataSources/da25256d-3e6b-489a-be16-36a09f9dc698.xml new file mode 100644 index 0000000..5ec6247 --- /dev/null +++ b/.idea/dataSources/da25256d-3e6b-489a-be16-36a09f9dc698.xml @@ -0,0 +1,156 @@ + + + + + 3.31.1 + + + 1 + + + + + +
+
+ 1 +
+ + + 1 + INTEGER|0s + 1 + + + 2 + VARCHAR|0s + 1 + + + 3 + VARCHAR|0s + 1 + + + 4 + VARCHAR|0s + 1 + + + 5 + INTEGER|0s + 1 + + + 6 + DATETIME|0s + 1 + + + 7 + INTEGER|0s + 1 + + + 8 + DATETIME|0s + 1 + + + id + 1 + + + created_user_id + user + id + + + updated_user_id + user + id + + + 1 + INTEGER|0s + 1 + + + 2 + INTEGER|0s + 1 + + + 3 + VARCHAR|0s + 1 + + + 4 + DATETIME|0s + 1 + + + 5 + DATETIME|0s + + + id + 1 + + + contact_id + contact + id + + + 1 + text|0s + + + 2 + text|0s + + + 3 + text|0s + + + 4 + int|0s + + + 5 + text|0s + + + 1 + INTEGER|0s + 1 + + + 2 + VARCHAR|0s + 1 + + + 3 + VARCHAR|0s + 1 + + + 1 + username + + 1 + + + id + 1 + + + username + sqlite_autoindex_user_1 + + + \ No newline at end of file diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml new file mode 100644 index 0000000..d6fda86 --- /dev/null +++ b/.idea/inspectionProfiles/Project_Default.xml @@ -0,0 +1,14 @@ + + + + \ No newline at end of file diff --git a/.idea/interview_app.iml b/.idea/interview_app.iml new file mode 100644 index 0000000..f2ea333 --- /dev/null +++ b/.idea/interview_app.iml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..5fd02a6 --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..71a9ea2 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..94a25f7 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml new file mode 100644 index 0000000..b1af954 --- /dev/null +++ b/.idea/workspace.xml @@ -0,0 +1,193 @@ + + + + + + + + + + + + + + + + + + +
-
-
- 1 -
- - - 1 - INTEGER|0s - 1 - - - 2 - VARCHAR|0s - 1 - - - 3 - VARCHAR|0s - 1 - - - 4 - VARCHAR|0s - 1 - - - 5 - INTEGER|0s - 1 - - - 6 - DATETIME|0s - 1 - - - 7 - INTEGER|0s - 1 - - - 8 - DATETIME|0s - 1 - - - id - 1 - - - created_user_id - user - id - - - updated_user_id - user - id - - - 1 - INTEGER|0s - 1 - - - 2 - INTEGER|0s - 1 - - - 3 - VARCHAR|0s - 1 - - - 4 - DATETIME|0s - 1 - - - 5 - DATETIME|0s - - - id - 1 - - - contact_id - contact - id - - - 1 - text|0s - - - 2 - text|0s - - - 3 - text|0s - - - 4 - int|0s - - - 5 - text|0s - - - 1 - INTEGER|0s - 1 - - - 2 - VARCHAR|0s - 1 - - - 3 - VARCHAR|0s - 1 - - - 1 - username - - 1 - - - id - 1 - - - username - sqlite_autoindex_user_1 - - - \ No newline at end of file diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml deleted file mode 100644 index d6fda86..0000000 --- a/.idea/inspectionProfiles/Project_Default.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - \ No newline at end of file diff --git a/.idea/interview_app.iml b/.idea/interview_app.iml deleted file mode 100644 index f2ea333..0000000 --- a/.idea/interview_app.iml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml deleted file mode 100644 index 5fd02a6..0000000 --- a/.idea/misc.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml deleted file mode 100644 index 71a9ea2..0000000 --- a/.idea/modules.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml deleted file mode 100644 index 94a25f7..0000000 --- a/.idea/vcs.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml deleted file mode 100644 index 47c25a5..0000000 --- a/.idea/workspace.xml +++ /dev/null @@ -1,167 +0,0 @@ - - - - - - - - - - - - - - - - - - -