Compare commits
1 Commits
c0a83b5781
...
pocketbase
| Author | SHA1 | Date | |
|---|---|---|---|
| 907e3ccec9 |
@@ -278,7 +278,11 @@
|
|||||||
if (isNew) {
|
if (isNew) {
|
||||||
result = await ApiClient.collection(collection.id).create(data);
|
result = await ApiClient.collection(collection.id).create(data);
|
||||||
} else {
|
} else {
|
||||||
result = await ApiClient.collection(collection.id).update(record.id, data);
|
result = await ApiClient.collection(collection.id).update(record.id, data, {
|
||||||
|
headers: {
|
||||||
|
"If-Unmodified-Since": record.updated,
|
||||||
|
},
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
addSuccessToast(isNew ? "Successfully created record." : "Successfully updated record.");
|
addSuccessToast(isNew ? "Successfully created record." : "Successfully updated record.");
|
||||||
@@ -318,7 +322,11 @@
|
|||||||
|
|
||||||
confirm(`Do you really want to delete the selected record?`, () => {
|
confirm(`Do you really want to delete the selected record?`, () => {
|
||||||
return ApiClient.collection(original.collectionId)
|
return ApiClient.collection(original.collectionId)
|
||||||
.delete(original.id)
|
.delete(original.id, {
|
||||||
|
headers: {
|
||||||
|
"If-Unmodified-Since": record.updated,
|
||||||
|
},
|
||||||
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
forceHide();
|
forceHide();
|
||||||
addSuccessToast("Successfully deleted record.");
|
addSuccessToast("Successfully deleted record.");
|
||||||
|
|||||||
Reference in New Issue
Block a user