}).
factory('Registration', function($resource){
- return $resource('/data/:database/registration/:registrationId', { database: 'drzb2013' }, {
+ return $resource('/data/:database/registration/:registrationId', { database: 'drzb2013v2' }, {
query: {method:'GET', params:{registraionId:'@id'}, isArray:true}
});
});
<a href="#/registration/{{registration.id}}">edit</a>
{{registration.user.registration_type}}
<tt>{{registration._id}}</tt>
- <a href="http://10.60.0.92:5984/_utils/document.html?drzb2013/{{registration._id}}" target="drzb">db</a>
+ <a href="http://10.60.0.92:5984/_utils/document.html?drzb2013v2/{{registration._id}}" target="drzb">db</a>
<p>
{{registration.user.firstname}}
my $ua = Mojo::UserAgent->new;
my $from = 'http://10.60.0.95:5984/drzb2013';
-my $to = 'http://10.60.0.92:5984/drzb2013';
+my $to = 'http://10.60.0.92:5984/drzb2013v2';
my $docs = $ua->get("$from/_all_docs?include_docs=true")->res->json;
my $id = $new->{_id} || die "no _id in new";
my $result = $ua->put("$to/$id" => Mojo::JSON->new->encode( $new ))->res->json;
- die "ERROR $id ",dump($result) unless $result->{ok};
+ die "ERROR $to/$id ",dump($result) unless $result->{ok};
warn "SAVED $id into $to\n";