changes
This commit is contained in:
@@ -45,7 +45,7 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
async save() {
|
||||
let rs = await this.$patchapi("file", this.record);
|
||||
let rs = await this.$patchapi("file", { data: this.record });
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
@@ -41,7 +41,7 @@ export default {
|
||||
computed: {
|
||||
pagedata: {
|
||||
get() {
|
||||
return this.$store.state[this.pagename1];
|
||||
return this.$store[this.pagename1];
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("updateStore", { name: this.pagename1, data: val });
|
||||
|
||||
@@ -33,10 +33,12 @@ function editImage(image) {
|
||||
async function saveEditImage() {
|
||||
try {
|
||||
await $patchapi("file", {
|
||||
id: editingImage.value.file,
|
||||
name: editingImageName.value,
|
||||
caption: editingImageCaption.value?.trim() || null,
|
||||
hashtag: editingImageHashtag.value?.trim() || null,
|
||||
data: {
|
||||
id: editingImage.value.file,
|
||||
name: editingImageName.value,
|
||||
caption: editingImageCaption.value?.trim() || null,
|
||||
hashtag: editingImageHashtag.value?.trim() || null,
|
||||
},
|
||||
});
|
||||
|
||||
props.loadImages();
|
||||
|
||||
Reference in New Issue
Block a user