Skip to content

Commit

Permalink
readme corrections
Browse files Browse the repository at this point in the history
  • Loading branch information
mitranim committed Apr 12, 2018
1 parent 1af205b commit e911114
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
*.lock
package-lock.json*
node_modules
/todo
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "koa-ring",
"version": "0.3.0",
"description": "Write Koa handlers as ƒ(request) -> response, like in Clojure/Ring. Supports automatic work cancelation via Posterus futures and coroutines. Comes with routing/mounting utilities out of the box.",
"description": "Write Koa handlers as ƒ(request) -> response, like in Clojure/Ring. Supports automatic cancelation on client disconnect via Posterus futures and fibers.",
"main": "koa-ring",
"keywords": [
"koa",
Expand Down
4 changes: 2 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -329,11 +329,11 @@ function mainHandler(request) {
function apiHandler(request) {
const {method, location: {pathname}} = request

if (method === 'get' && /^[/]api[/]user$/.test(pathname)) {
if (method === 'GET' && pathname === '/api/users') {
return userHandler(request)
}

if (method === 'post' && /^[/]api[/]login$/.test(pathname)) {
if (method === 'POST' && pathname === '/api/login') {
return loginHandler(request)
}

Expand Down

0 comments on commit e911114

Please sign in to comment.