Skip to content

Commit

Permalink
FIX: Integration of user registration feature.
Browse files Browse the repository at this point in the history
  • Loading branch information
benel committed May 12, 2015
1 parent bcd9ce1 commit a6953eb
Show file tree
Hide file tree
Showing 12 changed files with 18 additions and 13 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ log
node_modules
config.js
config.json
.couchapprc
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,8 @@ Installation procedure
* The service can be stopped with:

sudo forever stop app/proxy.js

* The (optional) Web interface can be installed in CouchDB with:

curl -X PUT -d '"false"' localhost:5984/_config/httpd/secure_rewrites
couchapp push --browse db http://localhost:5984/aaaforrest
7 changes: 0 additions & 7 deletions app/db/.couchappignore

This file was deleted.

1 change: 0 additions & 1 deletion app/db/.couchapprc

This file was deleted.

3 changes: 0 additions & 3 deletions app/db/couchapp.json

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ function register() {
var name = $("#login").val();
$.ajax({
type: "PUT",
url: "/_users/org.couchdb.user:" + name,
url: "_users/org.couchdb.user:" + name,
contentType: "application/json",
data: JSON.stringify({
name: name,
Expand Down Expand Up @@ -39,4 +39,4 @@ function onRegistred() {
$("#submit").hide();
$("#message").css("color", "#0c0").html("Your account has been created.");
$("#register").find("fieldset").slideUp();
}
}
File renamed without changes.
3 changes: 3 additions & 0 deletions db/couchapp.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"index" : "_rewrite/register.html"
}
7 changes: 7 additions & 0 deletions db/rewrites.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[{
"from": "_users/:user",
"to": "../../../_users/:user"
},{
"from": "*",
"to": "*"
}]

0 comments on commit a6953eb

Please sign in to comment.