Adds ChangeBanner for Creators
This commit is contained in:
@@ -10,11 +10,11 @@
|
||||
<v-form>
|
||||
<v-file-input
|
||||
v-model="selectedFile"
|
||||
label="Select Image"
|
||||
label="Choisisez votre contenu"
|
||||
accept="image/*"
|
||||
prepend-icon="mdi-camera"
|
||||
@change="onFileSelected">
|
||||
</v-file-input>
|
||||
@change="onFileSelected"
|
||||
></v-file-input>
|
||||
|
||||
<v-img
|
||||
v-if="url"
|
||||
@@ -66,14 +66,14 @@ const props = defineProps({
|
||||
type: String,
|
||||
required: true
|
||||
}
|
||||
});
|
||||
})
|
||||
|
||||
const client = useClient();
|
||||
const client = useClient()
|
||||
|
||||
const selectedFile = ref("");
|
||||
const url = ref("");
|
||||
const title = ref("");
|
||||
const description = ref("");
|
||||
const selectedFile = ref("")
|
||||
const url = ref("")
|
||||
const title = ref("")
|
||||
const description = ref("")
|
||||
|
||||
const onFileSelected = () => {
|
||||
if (selectedFile.value) {
|
||||
@@ -99,7 +99,6 @@ const publish = async () => {
|
||||
} else {
|
||||
console.error(`Failed to create content ${response.data}`)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ async function publishPost() {
|
||||
});
|
||||
|
||||
try {
|
||||
const response = await client.post(
|
||||
await client.post(
|
||||
`/api/contents/`,
|
||||
formData,
|
||||
{
|
||||
@@ -37,8 +37,7 @@ async function publishPost() {
|
||||
'Content-Type': 'multipart/form-data',
|
||||
}
|
||||
})
|
||||
|
||||
console.log('Files uploaded successfully:', response.data);
|
||||
|
||||
closeDialog()
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
|
||||
Reference in New Issue
Block a user