Skip to content

Commit

Permalink
feat: use couchdb as backend/api (#2)
Browse files Browse the repository at this point in the history
* docs(crawler): add `unauth_updates` design doc, allows public read-only access

* feat(crawler): basic couchdb support

* feat(crawler): use couchdb's bulk insert/update feature

* feat(crawler): show couchdb bulk insert/update errors on console

* feat(crawler): merge duplicate entries

* feat(frontend): fetch data from couchdb endpoint

* feat: remove "api" package
  • Loading branch information
kkkrist authored Oct 7, 2020
1 parent 149d8f7 commit d2b4459
Show file tree
Hide file tree
Showing 14 changed files with 166 additions and 1,410 deletions.
5 changes: 5 additions & 0 deletions _design/unauth_updates.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"_id": "_design/unauth_updates",
"language": "javascript",
"validate_doc_update": "function(newDoc, oldDoc, userCtx, secObj) { for (var i = 0; i < userCtx.roles.length; i++) { if (secObj.admins.roles.includes(userCtx.roles[i])) { return } } throw { unauthorized: 'You don\\'t have sufficient permissions!' } }"
}
19 changes: 0 additions & 19 deletions packages/api/.eslintrc.json

This file was deleted.

2 changes: 0 additions & 2 deletions packages/api/.gitignore

This file was deleted.

44 changes: 0 additions & 44 deletions packages/api/CHANGELOG.md

This file was deleted.

116 changes: 0 additions & 116 deletions packages/api/lib/index.js

This file was deleted.

Loading

0 comments on commit d2b4459

Please sign in to comment.