mirror of
https://github.com/bspeice/itcs4180
synced 2024-12-04 13:18:16 -05:00
Switch validation to use the new server API
This commit is contained in:
parent
720cb7ee38
commit
e29d802998
@ -35,11 +35,11 @@ public class LocationClient {
|
|||||||
return ra.create(LocationService.class);
|
return ra.create(LocationService.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String validateLocation(Context ctx, int id, String key) {
|
public static String validateLocation(Context ctx, String name, String key) {
|
||||||
LocationService client = getAdapter(ctx);
|
LocationService client = getAdapter(ctx);
|
||||||
Map<String, String> keys = new HashMap<String, String>();
|
Map<String, String> keys = new HashMap<String, String>();
|
||||||
keys.put("key", key);
|
keys.put("key", key);
|
||||||
keys.put("id", String.valueOf(id));
|
keys.put("name", name);
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
return client.getResult(keys);
|
return client.getResult(keys);
|
||||||
@ -75,7 +75,7 @@ public class LocationClient {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected String doInBackground(String... params) {
|
protected String doInBackground(String... params) {
|
||||||
return LocationClient.validateLocation(ctx, Integer.parseInt(params[0]), params[1]);
|
return LocationClient.validateLocation(ctx, params[0], params[1]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user