Subversion Repositories SmartDukaan

Rev

Rev 17202 | Rev 17212 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 17202 Rev 17208
Line 242... Line 242...
242
						// $this->Pushnotification->create();
242
						// $this->Pushnotification->create();
243
						// $this->Pushnotification->save($data);
243
						// $this->Pushnotification->save($data);
244
						$payload[] = $data;
244
						$payload[] = $data;
245
					}
245
					}
246
				}
246
				}
247
				$url = "http://45.33.50.227:3001/addPushNotification";//remove hardcoded value
247
				$url = Configure::read('nodeurl')."/addPushNotification";//remove hardcoded value
248
				$this->make_request($url,json_encode($payload,JSON_NUMERIC_CHECK));
248
				$this->make_request($url,json_encode($payload,JSON_NUMERIC_CHECK));
249
				$this->Session->setFlash(__('Push notification scheduled for '.sizeof($users).' users'));
249
				$this->Session->setFlash(__('Push notification scheduled for '.sizeof($users).' users'));
250
				return $this->redirect(array('controller' => 'administration', 'action' => 'dashboard', 'admin' => false));
250
				return $this->redirect(array('controller' => 'administration', 'action' => 'dashboard', 'admin' => false));
251
			}
251
			}
252
		}
252
		}