Subversion Repositories SmartDukaan

Rev

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

Rev 27234 Rev 28246
Line 111... Line 111...
111
	@Autowired
111
	@Autowired
112
	private CookiesProcessor cookiesProcessor;
112
	private CookiesProcessor cookiesProcessor;
113
 
113
 
114
	@Value("${google.api.key}")
114
	@Value("${google.api.key}")
115
	private String googleApiKey;
115
	private String googleApiKey;
-
 
116
	
-
 
117
	@Value("${app.token.url}")
-
 
118
	private String appTokenUrl;
-
 
119
	
-
 
120
	@Value("${admin.token}")
-
 
121
	private String adminToken;
116
 
122
 
117
	@Autowired
123
	@Autowired
118
	private AuthService authService;
124
	private AuthService authService;
119
 
125
 
120
	@Autowired
126
	@Autowired
Line 189... Line 195...
189
		}
195
		}
190
	}
196
	}
191
 
197
 
192
	private String getToken(String emailId) throws Exception {
198
	private String getToken(String emailId) throws Exception {
193
		List<NameValuePair> nameValuePairs = new ArrayList<>();
199
		List<NameValuePair> nameValuePairs = new ArrayList<>();
194
		nameValuePairs.add(new BasicNameValuePair("adminToken", "ecip$stgMay2014"));
200
		nameValuePairs.add(new BasicNameValuePair("adminToken", this.adminToken));
195
		nameValuePairs.add(new BasicNameValuePair("emailId", emailId));
201
		nameValuePairs.add(new BasicNameValuePair("emailId", emailId));
196
		String queryString = URLEncodedUtils.format(nameValuePairs, "UTF-8");
202
		String queryString = URLEncodedUtils.format(nameValuePairs, "UTF-8");
197
		String response = restClient.post("http://app.smartdukaan.com:8080/profitmandi-web/user/admin?" + queryString,
203
		String response = restClient.post("http://app.smartdukaan.com:8080/profitmandi-web/user/admin?" + queryString,
198
				new HashMap<>(), new HashMap<>());
204
				new HashMap<>(), new HashMap<>());
199
		Type t = new TypeToken<ProfitMandiResponse<Map<String, Object>>>() {
205
		Type t = new TypeToken<ProfitMandiResponse<Map<String, Object>>>() {