Skip to content
This repository was archived by the owner on Aug 21, 2018. It is now read-only.

Commit

Permalink
[933] Auto/pendng community (#994)
Browse files Browse the repository at this point in the history
  • Loading branch information
razu9861 authored and Pr0chin committed Aug 21, 2017
1 parent 7920adf commit 69a6ce5
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions app/MyApp/app/views/CommunityConfigurationsForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,23 @@ $(function() {
if(response.docs_written == 0 || response.docs_written == undefined){
alert(App.languageDict.attributes.UnableToReplicate);
}else{
$.ajax({
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json; charset=utf-8'
},
type: 'POST',
url: '/_replicate',
dataType: 'json',
data: JSON.stringify({
"source": "configurations",
"target": 'http://' + nationUrl + '/communityregistrationrequests',
'doc_ids': docIds
}),
async: false,
success: function (response) {
}
});
var members = new App.Models.Member({
"_id": $.cookie('Member._id')
});
Expand Down Expand Up @@ -385,6 +402,23 @@ $(function() {
if(response.docs_written == 0 || response.docs_written == undefined){
alert(App.languageDict.attributes.UnableToReplicate);
}else{
$.ajax({
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json; charset=utf-8'
},
type: 'POST',
url: '/_replicate',
dataType: 'json',
data: JSON.stringify({
"source": "configurations",
"target": 'http://' + nationUrl + '/community',
'doc_ids': docIds
}),
async: false,
success: function (response) {
}
});
$.ajax({
type: 'GET',
url: 'http://' + nationUrl + '/publications/_all_docs?include_docs=true',
Expand Down

0 comments on commit 69a6ce5

Please sign in to comment.