Skip to content

Commit

Permalink
Merge pull request #24 from fac20/airtable-model
Browse files Browse the repository at this point in the history
Airtable model
  • Loading branch information
trishtracking authored Oct 22, 2020
2 parents 42551b8 + 15cbc35 commit 5798b20
Show file tree
Hide file tree
Showing 13 changed files with 3,572 additions and 3,216 deletions.
56 changes: 56 additions & 0 deletions .circleci/configTest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
version: 2.1
orbs:
node: circleci/[email protected]
codecov: codecov/[email protected]
jobs:
# Download, install and cache dependencies
Tests:

# primary container

docker:
- image: circleci/node:14.5.0

environment:
TEST_DATABASE_URL: postgresql://root@localhost/circle_test

# service container

- image: circleci/postgres:9.6.5-alpine-ram
auth:
username: mydockerhub-user
password: $DOCKERHUB_PASSWORD # context / project UI env-var reference

steps:
- checkout
- restore_cache:
keys:
- v1-dependencies-{{ checksum "package-lock.json" }}
- run:
name: Install Dependencies
command: npm install
- persist_to_workspace:
paths:
- project
root: ~/
- save_cache:
key: v1-dependencies-{{ checksum "package-lock.json" }}
paths:
- ~/project/node_modules
- run:
name: run tests
command: npm run test
- run:
name: run tests and generate coverage
command: npm run cov
- run:
name: compile report
command: npm run report-test
- codecov/upload:
file: "./coverage.lcov"
token: 064e11d9-e351-4e4f-899d-f13af28649fb

workflows:
push:
jobs:
- Tests
1 change: 1 addition & 0 deletions .nyc_output/d25909a3-fd0a-4151-8633-c244f09cc9e0.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"/home/netceer/FAC20/week-15/tfb-kjmp-backend/src/database/build.js":{"path":"/home/netceer/FAC20/week-15/tfb-kjmp-backend/src/database/build.js","statementMap":{"0":{"start":{"line":1,"column":13},"end":{"line":1,"column":28}},"1":{"start":{"line":2,"column":11},"end":{"line":2,"column":24}},"2":{"start":{"line":3,"column":11},"end":{"line":3,"column":34}},"3":{"start":{"line":5,"column":17},"end":{"line":5,"column":53}},"4":{"start":{"line":6,"column":16},"end":{"line":6,"column":50}},"5":{"start":{"line":8,"column":14},"end":{"line":10,"column":1}},"6":{"start":{"line":9,"column":1},"end":{"line":9,"column":45}},"7":{"start":{"line":12,"column":0},"end":{"line":12,"column":23}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":8,"column":14},"end":{"line":8,"column":15}},"loc":{"start":{"line":8,"column":20},"end":{"line":10,"column":1}},"line":8}},"branchMap":{},"s":{"0":1,"1":1,"2":1,"3":1,"4":1,"5":1,"6":6,"7":1},"f":{"0":6},"b":{},"_coverageSchema":"1a1c01bbd47fc00a2c39e90264f33305004495a9","hash":"ae6b671eefdc03edbffca4e94dfd8dfb75140050","contentHash":"a8ac12ee5385b3bb0449172af55d94c6e01833636a2ff27339b7e3752f37ce79"},"/home/netceer/FAC20/week-15/tfb-kjmp-backend/src/database/connection.js":{"path":"/home/netceer/FAC20/week-15/tfb-kjmp-backend/src/database/connection.js","statementMap":{"0":{"start":{"line":1,"column":11},"end":{"line":1,"column":24}},"1":{"start":{"line":2,"column":15},"end":{"line":2,"column":41}},"2":{"start":{"line":4,"column":23},"end":{"line":4,"column":47}},"3":{"start":{"line":6,"column":0},"end":{"line":8,"column":1}},"4":{"start":{"line":7,"column":1},"end":{"line":7,"column":50}},"5":{"start":{"line":10,"column":11},"end":{"line":12,"column":2}},"6":{"start":{"line":14,"column":0},"end":{"line":14,"column":20}}},"fnMap":{},"branchMap":{"0":{"loc":{"start":{"line":6,"column":0},"end":{"line":8,"column":1}},"type":"if","locations":[{"start":{"line":6,"column":0},"end":{"line":8,"column":1}},{"start":{"line":6,"column":0},"end":{"line":8,"column":1}}],"line":6}},"s":{"0":1,"1":1,"2":1,"3":1,"4":1,"5":1,"6":1},"f":{},"b":{"0":[1,0]},"_coverageSchema":"1a1c01bbd47fc00a2c39e90264f33305004495a9","hash":"bb48f2fa2a526df9b4ad47ca7060d1d109c88307","contentHash":"d3f69c248f979056e7188041113173eb96d07cf7de1cc3482212f1af4ff7e568"},"/home/netceer/FAC20/week-15/tfb-kjmp-backend/src/handlers/tableHandlers.js":{"path":"/home/netceer/FAC20/week-15/tfb-kjmp-backend/src/handlers/tableHandlers.js","statementMap":{"0":{"start":{"line":10,"column":4},"end":{"line":10,"column":38}},"1":{"start":{"line":13,"column":1},"end":{"line":17,"column":15}},"2":{"start":{"line":15,"column":3},"end":{"line":15,"column":40}},"3":{"start":{"line":21,"column":19},"end":{"line":21,"column":32}},"4":{"start":{"line":22,"column":15},"end":{"line":22,"column":31}},"5":{"start":{"line":23,"column":1},"end":{"line":27,"column":15}},"6":{"start":{"line":25,"column":3},"end":{"line":25,"column":40}},"7":{"start":{"line":31,"column":14},"end":{"line":31,"column":22}},"8":{"start":{"line":32,"column":1},"end":{"line":32,"column":33}},"9":{"start":{"line":33,"column":1},"end":{"line":35,"column":15}},"10":{"start":{"line":34,"column":18},"end":{"line":34,"column":46}},"11":{"start":{"line":39,"column":14},"end":{"line":39,"column":22}},"12":{"start":{"line":40,"column":1},"end":{"line":40,"column":33}},"13":{"start":{"line":41,"column":1},"end":{"line":43,"column":15}},"14":{"start":{"line":42,"column":18},"end":{"line":42,"column":46}},"15":{"start":{"line":46,"column":14},"end":{"line":46,"column":22}},"16":{"start":{"line":47,"column":1},"end":{"line":47,"column":33}},"17":{"start":{"line":48,"column":1},"end":{"line":50,"column":15}},"18":{"start":{"line":49,"column":18},"end":{"line":49,"column":46}},"19":{"start":{"line":56,"column":15},"end":{"line":56,"column":31}},"20":{"start":{"line":57,"column":1},"end":{"line":61,"column":15}},"21":{"start":{"line":59,"column":3},"end":{"line":59,"column":39}},"22":{"start":{"line":65,"column":12},"end":{"line":65,"column":29}},"23":{"start":{"line":66,"column":15},"end":{"line":66,"column":31}},"24":{"start":{"line":67,"column":1},"end":{"line":71,"column":15}},"25":{"start":{"line":69,"column":3},"end":{"line":69,"column":33}},"26":{"start":{"line":75,"column":12},"end":{"line":75,"column":29}},"27":{"start":{"line":76,"column":15},"end":{"line":76,"column":31}},"28":{"start":{"line":77,"column":1},"end":{"line":81,"column":15}},"29":{"start":{"line":79,"column":3},"end":{"line":79,"column":33}},"30":{"start":{"line":84,"column":0},"end":{"line":93,"column":2}}},"fnMap":{"0":{"name":"displayAllCountries","decl":{"start":{"line":12,"column":9},"end":{"line":12,"column":28}},"loc":{"start":{"line":12,"column":45},"end":{"line":18,"column":1}},"line":12},"1":{"name":"(anonymous_1)","decl":{"start":{"line":14,"column":8},"end":{"line":14,"column":9}},"loc":{"start":{"line":14,"column":19},"end":{"line":16,"column":3}},"line":14},"2":{"name":"getCountrySpecificContent","decl":{"start":{"line":20,"column":9},"end":{"line":20,"column":34}},"loc":{"start":{"line":20,"column":51},"end":{"line":28,"column":1}},"line":20},"3":{"name":"(anonymous_3)","decl":{"start":{"line":24,"column":8},"end":{"line":24,"column":9}},"loc":{"start":{"line":24,"column":19},"end":{"line":26,"column":3}},"line":24},"4":{"name":"addThingsToDoHandler","decl":{"start":{"line":30,"column":9},"end":{"line":30,"column":29}},"loc":{"start":{"line":30,"column":46},"end":{"line":36,"column":1}},"line":30},"5":{"name":"(anonymous_5)","decl":{"start":{"line":34,"column":8},"end":{"line":34,"column":9}},"loc":{"start":{"line":34,"column":18},"end":{"line":34,"column":46}},"line":34},"6":{"name":"addExperiencesHandler","decl":{"start":{"line":38,"column":9},"end":{"line":38,"column":30}},"loc":{"start":{"line":38,"column":47},"end":{"line":44,"column":1}},"line":38},"7":{"name":"(anonymous_7)","decl":{"start":{"line":42,"column":8},"end":{"line":42,"column":9}},"loc":{"start":{"line":42,"column":18},"end":{"line":42,"column":46}},"line":42},"8":{"name":"addBusinessHandler","decl":{"start":{"line":45,"column":9},"end":{"line":45,"column":27}},"loc":{"start":{"line":45,"column":44},"end":{"line":51,"column":1}},"line":45},"9":{"name":"(anonymous_9)","decl":{"start":{"line":49,"column":8},"end":{"line":49,"column":9}},"loc":{"start":{"line":49,"column":18},"end":{"line":49,"column":46}},"line":49},"10":{"name":"getUnapprovedPostsHandler","decl":{"start":{"line":55,"column":9},"end":{"line":55,"column":34}},"loc":{"start":{"line":55,"column":51},"end":{"line":62,"column":1}},"line":55},"11":{"name":"(anonymous_11)","decl":{"start":{"line":58,"column":8},"end":{"line":58,"column":9}},"loc":{"start":{"line":58,"column":18},"end":{"line":60,"column":3}},"line":58},"12":{"name":"approvePostHandler","decl":{"start":{"line":64,"column":9},"end":{"line":64,"column":27}},"loc":{"start":{"line":64,"column":44},"end":{"line":72,"column":1}},"line":64},"13":{"name":"(anonymous_13)","decl":{"start":{"line":68,"column":8},"end":{"line":68,"column":9}},"loc":{"start":{"line":68,"column":14},"end":{"line":70,"column":3}},"line":68},"14":{"name":"deletePostHandler","decl":{"start":{"line":74,"column":9},"end":{"line":74,"column":26}},"loc":{"start":{"line":74,"column":43},"end":{"line":82,"column":1}},"line":74},"15":{"name":"(anonymous_15)","decl":{"start":{"line":78,"column":8},"end":{"line":78,"column":9}},"loc":{"start":{"line":78,"column":14},"end":{"line":80,"column":3}},"line":78}},"branchMap":{},"s":{"0":1,"1":1,"2":1,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":1,"20":1,"21":1,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":1},"f":{"0":1,"1":1,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":1,"11":1,"12":0,"13":0,"14":0,"15":0},"b":{},"_coverageSchema":"1a1c01bbd47fc00a2c39e90264f33305004495a9","hash":"901510b9dbe1a73565a6ea16e88cefd2416b703b","contentHash":"09d3dedb9f8235cd451fa7c6a7b34d213e65a497c0fb14533c8ee6503697a99b"},"/home/netceer/FAC20/week-15/tfb-kjmp-backend/src/model/postgresModels.js":{"path":"/home/netceer/FAC20/week-15/tfb-kjmp-backend/src/model/postgresModels.js","statementMap":{"0":{"start":{"line":1,"column":11},"end":{"line":1,"column":47}},"1":{"start":{"line":4,"column":1},"end":{"line":9,"column":25}},"2":{"start":{"line":7,"column":3},"end":{"line":7,"column":22}},"3":{"start":{"line":9,"column":18},"end":{"line":9,"column":23}},"4":{"start":{"line":13,"column":1},"end":{"line":21,"column":25}},"5":{"start":{"line":20,"column":18},"end":{"line":20,"column":29}},"6":{"start":{"line":21,"column":18},"end":{"line":21,"column":23}},"7":{"start":{"line":25,"column":1},"end":{"line":34,"column":3}},"8":{"start":{"line":38,"column":1},"end":{"line":47,"column":3}},"9":{"start":{"line":50,"column":1},"end":{"line":59,"column":3}},"10":{"start":{"line":63,"column":1},"end":{"line":66,"column":25}},"11":{"start":{"line":65,"column":18},"end":{"line":65,"column":29}},"12":{"start":{"line":66,"column":18},"end":{"line":66,"column":23}},"13":{"start":{"line":70,"column":1},"end":{"line":73,"column":25}},"14":{"start":{"line":72,"column":18},"end":{"line":72,"column":32}},"15":{"start":{"line":73,"column":18},"end":{"line":73,"column":23}},"16":{"start":{"line":77,"column":1},"end":{"line":79,"column":21}},"17":{"start":{"line":79,"column":16},"end":{"line":79,"column":19}},"18":{"start":{"line":82,"column":0},"end":{"line":91,"column":2}}},"fnMap":{"0":{"name":"getAllCountries","decl":{"start":{"line":3,"column":9},"end":{"line":3,"column":24}},"loc":{"start":{"line":3,"column":27},"end":{"line":10,"column":1}},"line":3},"1":{"name":"(anonymous_1)","decl":{"start":{"line":6,"column":8},"end":{"line":6,"column":9}},"loc":{"start":{"line":6,"column":18},"end":{"line":8,"column":3}},"line":6},"2":{"name":"(anonymous_2)","decl":{"start":{"line":9,"column":9},"end":{"line":9,"column":10}},"loc":{"start":{"line":9,"column":18},"end":{"line":9,"column":23}},"line":9},"3":{"name":"getApprovedPost","decl":{"start":{"line":12,"column":9},"end":{"line":12,"column":24}},"loc":{"start":{"line":12,"column":43},"end":{"line":22,"column":1}},"line":12},"4":{"name":"(anonymous_4)","decl":{"start":{"line":20,"column":8},"end":{"line":20,"column":9}},"loc":{"start":{"line":20,"column":18},"end":{"line":20,"column":29}},"line":20},"5":{"name":"(anonymous_5)","decl":{"start":{"line":21,"column":9},"end":{"line":21,"column":10}},"loc":{"start":{"line":21,"column":18},"end":{"line":21,"column":23}},"line":21},"6":{"name":"addBusiness","decl":{"start":{"line":24,"column":9},"end":{"line":24,"column":20}},"loc":{"start":{"line":24,"column":31},"end":{"line":35,"column":1}},"line":24},"7":{"name":"addThingsToDo","decl":{"start":{"line":37,"column":9},"end":{"line":37,"column":22}},"loc":{"start":{"line":37,"column":37},"end":{"line":48,"column":1}},"line":37},"8":{"name":"addExperiences","decl":{"start":{"line":49,"column":9},"end":{"line":49,"column":23}},"loc":{"start":{"line":49,"column":36},"end":{"line":60,"column":1}},"line":49},"9":{"name":"getUnapproved","decl":{"start":{"line":62,"column":9},"end":{"line":62,"column":22}},"loc":{"start":{"line":62,"column":30},"end":{"line":67,"column":1}},"line":62},"10":{"name":"(anonymous_10)","decl":{"start":{"line":65,"column":8},"end":{"line":65,"column":9}},"loc":{"start":{"line":65,"column":18},"end":{"line":65,"column":29}},"line":65},"11":{"name":"(anonymous_11)","decl":{"start":{"line":66,"column":9},"end":{"line":66,"column":10}},"loc":{"start":{"line":66,"column":18},"end":{"line":66,"column":23}},"line":66},"12":{"name":"updateApproval","decl":{"start":{"line":69,"column":9},"end":{"line":69,"column":23}},"loc":{"start":{"line":69,"column":35},"end":{"line":74,"column":1}},"line":69},"13":{"name":"(anonymous_13)","decl":{"start":{"line":72,"column":8},"end":{"line":72,"column":9}},"loc":{"start":{"line":72,"column":18},"end":{"line":72,"column":32}},"line":72},"14":{"name":"(anonymous_14)","decl":{"start":{"line":73,"column":9},"end":{"line":73,"column":10}},"loc":{"start":{"line":73,"column":18},"end":{"line":73,"column":23}},"line":73},"15":{"name":"deletePost","decl":{"start":{"line":76,"column":9},"end":{"line":76,"column":19}},"loc":{"start":{"line":76,"column":31},"end":{"line":80,"column":1}},"line":76},"16":{"name":"(anonymous_16)","decl":{"start":{"line":79,"column":9},"end":{"line":79,"column":10}},"loc":{"start":{"line":79,"column":16},"end":{"line":79,"column":19}},"line":79}},"branchMap":{},"s":{"0":1,"1":2,"2":2,"3":0,"4":3,"5":3,"6":0,"7":0,"8":0,"9":0,"10":2,"11":2,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":1},"f":{"0":2,"1":2,"2":0,"3":3,"4":3,"5":0,"6":0,"7":0,"8":0,"9":2,"10":2,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0},"b":{},"_coverageSchema":"1a1c01bbd47fc00a2c39e90264f33305004495a9","hash":"c18185f0c7c2c4f64ca3e495675b347568bde90b","contentHash":"791ad198dd0621688990c8283c90a7d2394842ade50b4e1c7e7969ccf764ab1f"},"/home/netceer/FAC20/week-15/tfb-kjmp-backend/src/app.js":{"path":"/home/netceer/FAC20/week-15/tfb-kjmp-backend/src/app.js","statementMap":{"0":{"start":{"line":1,"column":16},"end":{"line":1,"column":34}},"1":{"start":{"line":2,"column":0},"end":{"line":2,"column":27}},"2":{"start":{"line":3,"column":13},"end":{"line":3,"column":28}},"3":{"start":{"line":13,"column":4},"end":{"line":13,"column":39}},"4":{"start":{"line":14,"column":21},"end":{"line":14,"column":50}},"5":{"start":{"line":16,"column":12},"end":{"line":16,"column":21}},"6":{"start":{"line":17,"column":0},"end":{"line":17,"column":22}},"7":{"start":{"line":19,"column":0},"end":{"line":19,"column":24}},"8":{"start":{"line":21,"column":0},"end":{"line":21,"column":16}},"9":{"start":{"line":24,"column":0},"end":{"line":24,"column":43}},"10":{"start":{"line":25,"column":0},"end":{"line":25,"column":60}},"11":{"start":{"line":27,"column":0},"end":{"line":27,"column":62}},"12":{"start":{"line":28,"column":0},"end":{"line":28,"column":58}},"13":{"start":{"line":29,"column":0},"end":{"line":29,"column":62}},"14":{"start":{"line":32,"column":0},"end":{"line":32,"column":53}},"15":{"start":{"line":33,"column":0},"end":{"line":33,"column":55}},"16":{"start":{"line":34,"column":0},"end":{"line":34,"column":52}},"17":{"start":{"line":36,"column":0},"end":{"line":36,"column":21}}},"fnMap":{},"branchMap":{},"s":{"0":1,"1":1,"2":1,"3":1,"4":1,"5":1,"6":1,"7":1,"8":1,"9":1,"10":1,"11":1,"12":1,"13":1,"14":1,"15":1,"16":1,"17":1},"f":{},"b":{},"_coverageSchema":"1a1c01bbd47fc00a2c39e90264f33305004495a9","hash":"6a06e981cb8658d2278b088259664e50ec3b89b0","contentHash":"1c3c3cd6b54878e1340a1a43edd65b9aa36f31f686be33729a62f90574d3e0d7"},"/home/netceer/FAC20/week-15/tfb-kjmp-backend/src/middleware/error.js":{"path":"/home/netceer/FAC20/week-15/tfb-kjmp-backend/src/middleware/error.js","statementMap":{"0":{"start":{"line":2,"column":1},"end":{"line":2,"column":20}},"1":{"start":{"line":3,"column":16},"end":{"line":3,"column":35}},"2":{"start":{"line":4,"column":1},"end":{"line":4,"column":66}},"3":{"start":{"line":7,"column":0},"end":{"line":7,"column":30}}},"fnMap":{"0":{"name":"handleErrors","decl":{"start":{"line":1,"column":9},"end":{"line":1,"column":21}},"loc":{"start":{"line":1,"column":45},"end":{"line":5,"column":1}},"line":1}},"branchMap":{"0":{"loc":{"start":{"line":3,"column":16},"end":{"line":3,"column":35}},"type":"binary-expr","locations":[{"start":{"line":3,"column":16},"end":{"line":3,"column":28}},{"start":{"line":3,"column":32},"end":{"line":3,"column":35}}],"line":3}},"s":{"0":0,"1":0,"2":0,"3":1},"f":{"0":0},"b":{"0":[0,0]},"_coverageSchema":"1a1c01bbd47fc00a2c39e90264f33305004495a9","hash":"be4bb639c3b2ec1483e832dfc6a7403dba3fa00e","contentHash":"ff47771a7997e8db1fd98004c990d8869cab0f9af1095c1c2b7010b80fd383b9"}}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"parent":null,"pid":33490,"argv":["/home/netceer/.nvm/versions/node/v14.5.0/bin/node","/home/netceer/FAC20/week-15/tfb-kjmp-backend/node_modules/.bin/tape","src/tests/*"],"execArgv":[],"cwd":"/home/netceer/FAC20/week-15/tfb-kjmp-backend","time":1603279404295,"ppid":33472,"coverageFilename":"/home/netceer/FAC20/week-15/tfb-kjmp-backend/.nyc_output/d25909a3-fd0a-4151-8633-c244f09cc9e0.json","externalId":"","uuid":"d25909a3-fd0a-4151-8633-c244f09cc9e0","files":["/home/netceer/FAC20/week-15/tfb-kjmp-backend/src/database/build.js","/home/netceer/FAC20/week-15/tfb-kjmp-backend/src/database/connection.js","/home/netceer/FAC20/week-15/tfb-kjmp-backend/src/handlers/tableHandlers.js","/home/netceer/FAC20/week-15/tfb-kjmp-backend/src/model/postgresModels.js","/home/netceer/FAC20/week-15/tfb-kjmp-backend/src/app.js","/home/netceer/FAC20/week-15/tfb-kjmp-backend/src/middleware/error.js"]}
1 change: 1 addition & 0 deletions .nyc_output/processinfo/index.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"processes":{"d25909a3-fd0a-4151-8633-c244f09cc9e0":{"parent":null,"children":[]}},"files":{"/home/netceer/FAC20/week-15/tfb-kjmp-backend/src/database/build.js":["d25909a3-fd0a-4151-8633-c244f09cc9e0"],"/home/netceer/FAC20/week-15/tfb-kjmp-backend/src/database/connection.js":["d25909a3-fd0a-4151-8633-c244f09cc9e0"],"/home/netceer/FAC20/week-15/tfb-kjmp-backend/src/handlers/tableHandlers.js":["d25909a3-fd0a-4151-8633-c244f09cc9e0"],"/home/netceer/FAC20/week-15/tfb-kjmp-backend/src/model/postgresModels.js":["d25909a3-fd0a-4151-8633-c244f09cc9e0"],"/home/netceer/FAC20/week-15/tfb-kjmp-backend/src/app.js":["d25909a3-fd0a-4151-8633-c244f09cc9e0"],"/home/netceer/FAC20/week-15/tfb-kjmp-backend/src/middleware/error.js":["d25909a3-fd0a-4151-8633-c244f09cc9e0"]},"externalIds":{}}
Loading

0 comments on commit 5798b20

Please sign in to comment.