mirror of
https://github.com/ClaytonWWilson/Listify.git
synced 2025-12-17 02:58:48 +00:00
Fix unique assertion on share rows
This commit is contained in:
parent
3b938bdd2c
commit
d4606df350
@ -22,7 +22,7 @@ public class ListSharer implements CallHandler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
final private String CHECK_ACCESS = "SELECT * from ListSharee WHERE listID = ? AND userID = ?;";
|
final private String CHECK_ACCESS = "SELECT * from ListSharee WHERE listID = ? AND userID = ?;";
|
||||||
final private String SHARE_LIST = "REPLACE INTO ListSharee(listID, userID, permissionLevel) VALUES(?, ?, ?);";
|
final private String SHARE_LIST = "INSERT INTO ListSharee(listID, userID, permissionLevel) VALUES(?, ?, ?) ON DUPLICATE;";
|
||||||
|
|
||||||
public Object conductAction(Map<String, Object> bodyMap, HashMap<String, String> queryString, String cognitoID) throws SQLException {
|
public Object conductAction(Map<String, Object> bodyMap, HashMap<String, String> queryString, String cognitoID) throws SQLException {
|
||||||
PreparedStatement checkAccess = connection.prepareStatement(CHECK_ACCESS);
|
PreparedStatement checkAccess = connection.prepareStatement(CHECK_ACCESS);
|
||||||
|
|||||||
@ -114,7 +114,7 @@ public class ListPage extends AppCompatActivity implements Requestor.Receiver {
|
|||||||
public void onClick(DialogInterface dialog, int which) {
|
public void onClick(DialogInterface dialog, int which) {
|
||||||
EditText sharedEmailText = (EditText) codeView.findViewById(R.id.editTextTextSharedEmail);
|
EditText sharedEmailText = (EditText) codeView.findViewById(R.id.editTextTextSharedEmail);
|
||||||
String sharedEmail = sharedEmailText.getText().toString();
|
String sharedEmail = sharedEmailText.getText().toString();
|
||||||
ListShare listShare = new ListShare(listID, sharedEmail, "Read, Edit, Delete, Share");
|
ListShare listShare = new ListShare(listID, sharedEmail, "Read, Write, Delete, Share");
|
||||||
try {
|
try {
|
||||||
requestor.putObject(listShare);
|
requestor.putObject(listShare);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -129,7 +129,7 @@ public class ShoppingListsSwipeableAdapter extends BaseAdapter {
|
|||||||
public void onClick(DialogInterface dialog, int which) {
|
public void onClick(DialogInterface dialog, int which) {
|
||||||
EditText sharedEmailText = (EditText) codeView.findViewById(R.id.editTextTextSharedEmail);
|
EditText sharedEmailText = (EditText) codeView.findViewById(R.id.editTextTextSharedEmail);
|
||||||
String sharedEmail = sharedEmailText.getText().toString();
|
String sharedEmail = sharedEmailText.getText().toString();
|
||||||
ListShare listShare = new ListShare(curList.getItemID(), sharedEmail, "Read, Edit, Delete, Share");
|
ListShare listShare = new ListShare(curList.getItemID(), sharedEmail, "Read, Write, Delete, Share");
|
||||||
try {
|
try {
|
||||||
requestor.putObject(listShare);
|
requestor.putObject(listShare);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user